Skip to content
Heist/ feed
Back to feed
LowFix available

GitHub CLI allows path traversal through unescaped request URL components

Type: advisorySources: OSV2 source records

### Summary A path traversal vulnerability has been identified in the GitHub CLI where some HTTP request URLs, REST API calls in particular, were built without properly escaping their variable path components. A value containing URL path metacharacters can alter the request path and cause `gh` to address a different resource than intended. ### Details Not all request URLs in the codebase were built with proper escaping of their variable path components. When a component is interpolated into the path without percent encoding, and that component contains URL path metacharacters, it breaks out of its intended segment and changes the effective request path. In `2.97.0`, request URLs are constructed in a safe manner, so a variable component can no longer escape its intended segment. ### Impact An attacker who can control a value that flows into a request path can cause `gh` to send the request to a different API endpoint than intended. This can lead the CLI to read or act on a resource other than the one the user meant to target. ### Remediation and Mitigation 1. Upgrade `gh` to `2.97.0`. 2. Be cautious when running `gh` against untrusted repositories or inputs whose names you do not control.

Products
github.com/cli/cli, github.com/cli/cli/v2
Affected versions
Not specified
Fixed versions
2.97.0
CVEs
CVE-2026-64653
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 08:44 UTC · Revision 1

Source evidence

GitHub CLI allows path traversal through unescaped request URL components

core-osv · Original source

Published 15 Oct 2026, 18:07 UTC

### Summary A path traversal vulnerability has been identified in the GitHub CLI where some HTTP request URLs, REST API calls in particular, were built without properly escaping their variable path components. A value containing URL path metacharacters can alter the request path and cause `gh` to address a different resource than intended. ### Details Not all request URLs in the codebase were built with proper escaping of their variable path components. When a component is interpolated into the path without percent encoding, and that component contains URL path metacharacters, it breaks out of its intended segment and changes the effective request path. In `2.97.0`, request URLs are constructed in a safe manner, so a variable component can no longer escape its intended segment. ### Impact An attacker who can control a value that flows into a request path can cause `gh` to send the request to a different API endpoint than intended. This can lead the CLI to read or act on a resource other than the one the user meant to target. ### Remediation and Mitigation 1. Upgrade `gh` to `2.97.0`. 2. Be cautious when running `gh` against untrusted repositories or inputs whose names you do not control.

osv:GHSA-4fjg-2h4q-fwg3

github.com/cli/cli/v2

Fixed versions: 2.97.0

Complete source record
{
  "id": "70f8f05a6c1b324dee4f6e9981f21ff38de6c81aeb1b4bf223445d6e50b011c5",
  "url": "https://osv.dev/vulnerability/GHSA-4fjg-2h4q-fwg3",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "GitHub CLI allows path traversal through unescaped request URL components",
    "summary": "### Summary A path traversal vulnerability has been identified in the GitHub CLI where some HTTP request URLs, REST API calls in particular, were built without properly escaping their variable path components. A value containing URL path metacharacters can alter the request path and cause `gh` to address a different resource than intended. ### Details Not all request URLs in the codebase were built with proper escaping of their variable path components. When a component is interpolated into the path without percent encoding, and that component contains URL path metacharacters, it breaks out of its intended segment and changes the effective request path. In `2.97.0`, request URLs are constructed in a safe manner, so a variable component can no longer escape its intended segment. ### Impact An attacker who can control a value that flows into a request path can cause `gh` to send the request to a different API endpoint than intended. This can lead the CLI to read or act on a resource other than the one the user meant to target. ### Remediation and Mitigation 1. Upgrade `gh` to `2.97.0`. 2. Be cautious when running `gh` against untrusted repositories or inputs whose names you do not control.",
    "evidence": "osv:GHSA-4fjg-2h4q-fwg3",
    "products": [
      {
        "name": {
          "value": "github.com/cli/cli/v2",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.97.0",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "low",
    "structured": {
      "id": "GHSA-4fjg-2h4q-fwg3",
      "aliases": [
        "CVE-2026-64653",
        "GHSA-4fjg-2h4q-fwg3",
        "GO-2026-6765"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.97.0"
                }
              ]
            }
          ],
          "package": {
            "name": "github.com/cli/cli/v2",
            "purl": "pkg:golang/github.com/cli/cli/v2",
            "ecosystem": "Go"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-4fjg-2h4q-fwg3/GHSA-4fjg-2h4q-fwg3.json"
          }
        }
      ],
      "modified": "2026-10-19T21:40:57.702450779Z",
      "provider": "osv",
      "references": [
        "https://github.com/cli/cli/security/advisories/GHSA-4fjg-2h4q-fwg3",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-64653",
        "https://github.com/cli/cli/commit/0c2eea6338a2323cfff000160b9b5a56a38d2a06",
        "https://github.com/cli/cli",
        "https://github.com/cli/cli/releases/tag/v2.97.0"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-22"
        ],
        "severity": "LOW",
        "github_reviewed": true,
        "nvd_published_at": "2026-08-06T22:18:13Z",
        "github_reviewed_at": "2026-10-15T18:07:14Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-64653",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/database_specific/severity"
  },
  "source_id": "core-osv",
  "document_id": 376761,
  "published_at": "2026-10-15T18:07:14+00:00"
}

GitHub CLI allows path traversal through unescaped request URL components in github.com/cli/cli

core-osv · Original source

Published 19 Oct 2026, 21:08 UTC

GitHub CLI allows path traversal through unescaped request URL components in github.com/cli/cli

osv:GO-2026-6765

github.com/cli/cli

Fixed versions: Not specified

github.com/cli/cli/v2

Fixed versions: 2.97.0

Complete source record
{
  "id": "420b38a00a3a1138d2fb84686007b5a18c582da74ac874fb6f76bd437cd512b9",
  "url": "https://osv.dev/vulnerability/GO-2026-6765",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "GitHub CLI allows path traversal through unescaped request URL components in github.com/cli/cli",
    "summary": "GitHub CLI allows path traversal through unescaped request URL components in github.com/cli/cli",
    "evidence": "osv:GO-2026-6765",
    "products": [
      {
        "name": {
          "value": "github.com/cli/cli",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      },
      {
        "name": {
          "value": "github.com/cli/cli/v2",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.97.0",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "GO-2026-6765",
      "aliases": [
        "CVE-2026-64653",
        "GHSA-4fjg-2h4q-fwg3",
        "GO-2026-6765"
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "github.com/cli/cli",
            "purl": "pkg:golang/github.com/cli/cli",
            "ecosystem": "Go"
          },
          "database_specific": {
            "source": "https://vuln.go.dev/ID/GO-2026-6765.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.97.0"
                }
              ]
            }
          ],
          "package": {
            "name": "github.com/cli/cli/v2",
            "purl": "pkg:golang/github.com/cli/cli/v2",
            "ecosystem": "Go"
          },
          "database_specific": {
            "source": "https://vuln.go.dev/ID/GO-2026-6765.json"
          },
          "ecosystem_specific": {}
        }
      ],
      "modified": "2026-10-19T21:31:53.420127909Z",
      "provider": "osv",
      "references": [
        "https://github.com/cli/cli/security/advisories/GHSA-4fjg-2h4q-fwg3",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-64653",
        "https://github.com/cli/cli/commit/0c2eea6338a2323cfff000160b9b5a56a38d2a06",
        "https://github.com/cli/cli/releases/tag/v2.97.0"
      ],
      "provider_metadata": {
        "url": "https://pkg.go.dev/vuln/GO-2026-6765",
        "review_status": "UNREVIEWED"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-64653",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 376723,
  "published_at": "2026-10-19T21:08:35+00:00"
}