GitHub CLI: `gh codespace ports forward` exposes forwarded services on all network interfaces by default
Key facts
- Attack vector
- Adjacent network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Partial Red Hat: 2 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and Red Hat.
Summary
GitHub CLI (gh) is GitHub's official command line tool. Versions 2.28.0 through 2.97.0 bind the local listener created by gh codespace ports forward to all available network interfaces by default. While port forwarding is active, a service in a Codespace can therefore become reachable through the user's non-loopback local IP addresses by other hosts that can route to the user's machine. This behavior does not change the GitHub-side visibility of the Codespaces port. Instead, it exposes the forwarded service through a wildcard-bound listener on the user's local machine, even when the source Codespaces port remains private. Exploitation requires a network-adjacent attacker to reach the victim's machine while forwarding is active. This issue is fixed in version 2.98.0.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
- Fix · CNA cli (cli) Fixed in 2.98.0
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat OpenShift GitOps | Affected | No fix yet: Fix deferred |
| Red Hat OpenStack Platform 18.0 | Affected | No fix yet: Fix deferred |
Timeline
- 2026-10-02 Threatist record created from CVE-2026-72924
References
More cli vulnerabilities
- TI-2025-18873 `gh attestation verify` returns incorrect exit code during verification if no attestations are present CVSS 3.1MEDIUM 6.3
- TI-2026-33538 gh: GitHub Actions log output in `gh run view` allows terminal escape sequence injection CVSS 3.1LOW 3.5
- TI-2024-34983 Connecting to a malicious Codespaces via GH CLI could allow command execution on the user's computer CVSS 3.1CRITICAL 9.6
- TI-2026-35862 GitHub CLI tokens leak via `gh attestation` commands CVSS 3.1CRITICAL 9.1
- TI-2024-36052 go-gh `auth.TokenForHost` violates GitHub host security boundary within a codespace CVSS 3.1HIGH 7.5
- TI-2024-36051 Recursive repository cloning can leak authentication tokens to non-GitHub submodule hosts in the gh cli CVSS 3.1MEDIUM 6.5
Sources
- CVE-2026-72924 · CVE Program
- CVE-2026-72924 · NVD
- FIRST EPSS
- CVE-2026-72924 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences