Critical Vulnerability in GitHub CLI (gh): Incorrect Exit Status in Artifact Attestation Verification

gh Updated 02 Oct 2025

Summary

14/02/2025
N/A
No i
Unrated
Not published

CVE-2025-25204: gh is GitHub’s official command line tool. Affects gh versions 2.23.0+dfsg1-1 – 2.46.0-3. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

GitHub CLI (gh) is an official command line tool developed by GitHub that allows users to interact with GitHub repositories and perform various tasks directly from the terminal. It provides features for managing issues, pull requests, and other GitHub functionalities. However, a recent vulnerability has been identified in the Artifact Attestation verification process, which could lead to security risks when deploying artifacts.

Vulnerability Detail

The vulnerability arises from a bug in the gh attestation verify command, which, starting from version 2.49.0 and prior to version 2.67.0, incorrectly returns a zero exit status when no attestations are present. This behavior is misleading, as it should return a non-zero exit status to indicate a verification failure. An attacker could exploit this flaw to deploy malicious artifacts in systems that rely on the exit codes from gh attestation verify to control deployments, potentially compromising the integrity of the software supply chain.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users should manually check for attestations before relying on the exit status of the gh attestation verify command. This can be done by implementing additional checks in deployment scripts to ensure that artifacts are verified correctly before proceeding with deployment.

Conclusion

The vulnerability identified in GitHub CLI (gh) poses a significant risk due to its incorrect handling of exit statuses during artifact verification. Users are strongly advised to update to the latest version to mitigate potential security threats. Implementing additional verification checks can serve as a temporary measure until the update is applied.

See every vulnerability recorded for gh →

Share this vulnerability

FAQ

The vulnerability could allow attackers to deploy malicious artifacts by exploiting the incorrect exit status returned by the gh attestation verify command.

You can check your version of GitHub CLI by running gh --version in your terminal. If it is between versions 2.49.0 and 2.67.0, it is affected.

If an immediate update is not possible, implement additional verification checks in your deployment scripts to ensure that artifacts are validated before deployment.

More information can be found in the official CVE database or by visiting the GitHub CLI repository for updates and security advisories.

Yes, Vulert can monitor and alert you in real-time for open-source vulnerabilities in your software by using a manifest file like package-lock.json. You can check if your application is affected by this vulnerability using the Vulert playground without any signup.

Related vulnerabilities

Recent vulnerabilities recorded for gh.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback