{"id":"GHSA-fgw4-v983-mgp8","revision":"958745f26a3b4a4ea674ecb7b9d7a2a1","records":[{"revision":"958745f26a3b4a4ea674ecb7b9d7a2a1","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-fgw4-v983-mgp8","aliases":["CVE-2025-25204","GO-2025-3467"],"title":"`gh attestation verify` returns incorrect exit code during verification if no attestations are present","description":"### Summary\n\nA bug in GitHub's Artifact Attestation CLI tool, `gh attestation verify`, may return an incorrect zero exit status when no matching attestations are found for the specified `--predicate-type <value>` or the default `https://slsa.dev/provenance/v1` if not specified. This issue only arises if an artifact has an attestation with a predicate type different from the one provided in the command. As a result, users relying solely on these exit codes may mistakenly believe the attestation has been verified, despite the absence of an attestation with the specified predicate type and the tool printing a verification failure.\n\nUsers are advised to update `gh` to version `v2.67.0` as soon as possible.\n\nInitial report: https://github.com/cli/cli/issues/10418\nFix: https://github.com/cli/cli/pull/10421\n\n### Details\n\nThe gh attestation verify command fetches, loads, and attempts to verify attestations associated with a given artifact for a specified predicate type. If an attestation is found, but the predicate type does not match the one specified in the `gh attestation verify` command, the verification fails, but the program exits early.\n\nDue to a re-used uninitialized error variable, when no matching attestations are found, the relevant function returns `nil` instead of an error, causing the program to exit with a status code of `0`, which incorrectly suggests successful verification.\n\n### PoC\n\nRun `gh attestation verify` with local attestations using the `--bundle` flag and specify a predicate type with `--predicate-type` that you know will not match any of the attestations the command will attempt to verify. Confirm that the command exits with a zero status code.\n\n### Impact\n\nUsers who rely exclusively on the exit status code of `gh attestation verify` may incorrectly verify an attestation when the attestation's predicate type does not match the specified predicate type in the command.","state":0,"publishedAt":"2025-02-14T17:19:14+00:00","modifiedAt":"2026-09-10T03:50:22.7128554+00:00","affected":[{"ecosystem":"Go","name":"github.com/cli/cli/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"2.49.0"},{"kind":"fixed","version":"2.67.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:H/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/cli/cli/security/advisories/GHSA-fgw4-v983-mgp8","https://nvd.nist.gov/vuln/detail/CVE-2025-25204","https://github.com/cli/cli/issues/10418","https://github.com/cli/cli/pull/10421","https://github.com/cli/cli"],"sourceUrl":"https://github.com/advisories/GHSA-fgw4-v983-mgp8","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-fgw4-v983-mgp8","identifiers":["GHSA-fgw4-v983-mgp8","CVE-2025-25204","GO-2025-3467"]},"retained":false,"historicalAffected":[]}],"coverage":[]}