Description
GitHub CLI (gh) is GitHub’s official command line tool. Prior to 2.97.0, some HTTP request URLs interpolate variable path components without percent encoding, allowing URL path metacharacters in attacker-controlled repository or resource values to make gh address a different API endpoint or resource than the user intended. This issue is fixed in version 2.97.0.
Severity (CVSS)
| Base score | 5.1 |
|---|---|
| Severity | Medium |
| Version | CVSS 4.0 |
| Vector | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N |
| Provided by | CNA |
Weaknesses
- CWE-22 — CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected products
| Vendor | Product | Versions |
|---|---|---|
| cli | cli | < 2.97.0 |
References
- https://github.com/cli/cli/security/advisories/GHSA-4fjg-2h4q-fwg3 (x_refsource_CONFIRM)
- https://github.com/cli/cli/commit/0c2eea6338a2323cfff000160b9b5a56a38d2a06 (x_refsource_MISC)
- https://github.com/cli/cli/releases/tag/v2.97.0 (x_refsource_MISC)
Generated from the official CVE List on 07 Aug 2026 07:02 UTC.