Vulnerability · Published Feb 14, 2025 · Assigned by GitHub_M
CVE-2025-25204`gh attestation verify` returns incorrect exit code during verification if no attestations are present
Medium 6.3
In plain English
A medium-severity security flaw in cli from cli. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 35% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
`gh` is GitHub’s official command line tool. Starting in version 2.49.0 and prior to version 2.67.0, under certain conditions, a bug in GitHub's Artifact Attestation cli tool `gh attestation verify` causes it to return a zero exit status when no attestations are present. This behavior is incorrect: When no attestations are present, `gh attestation verify` should return a non-zero exit status code, thereby signaling verification failure. An attacker can abuse this flaw to, for example, deploy malicious artifacts in any system that uses `gh attestation verify`'s exit codes to gatekeep deployments. Users are advised to update `gh` to patched version `v2.67.0` as soon as possible.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/cli/cli | no fix listed | GO-2025-3467 |
| Go | github.com/cli/cli/v2 | 2.67.0 | GHSA-fgw4-v983-mgp8 |
| Go | github.com/cli/cli/v2 | 2.67.0 | GO-2025-3467 |
| Ubuntu:22.04:LTS | gh | no fix listed | UBUNTU-CVE-2025-25204 |
| Ubuntu:25.10 | gh | no fix listed | UBUNTU-CVE-2025-25204 |
Affected products (as reported)
Weakness: CWE-390 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:H/A:N
References
- https://github.com/cli/cli/security/advisories/GHSA-fgw4-v983-mgp8 x_refsource_CONFIRM
- https://github.com/cli/cli/issues/10418 x_refsource_MISC
- https://github.com/cli/cli/pull/10421 x_refsource_MISC