# CVE-2026-64654: GitHub CLI: Terminal escape sequence injection in multiple `gh` commands

> Attackers can inject terminal escape sequences into GitHub CLI output, potentially executing commands or manipulating the display on user terminals.

- **Severity:** Medium 5.3 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 6 Aug 2026
- **Updated:** 7 Aug 2026
- **Also known as:** AZL-95462, DEBIAN-CVE-2026-64654, GHSA-3m3g-3wcr-px46, UBUNTU-CVE-2026-64654

## What is CVE-2026-64654?

CVE-2026-64654 is a medium-severity command injection vulnerability in cli, published on 6 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

GitHub CLI (gh) is GitHub's official command line tool. Prior to version 2.97.0, multiple GitHub CLI commands printed externally controlled gist, API, pull request, release, codespace, skill, or agent-task content without neutralizing terminal escape sequences. An attacker who can influence that content can embed escape sequences that are interpreted by the terminal of a user who runs an affected command, with impact ranging from cosmetic manipulation of the title or on-screen content to, on some terminal emulators, command execution. This extends the same class of issue as CVE-2026-45803—which addressed only gh run view --log—to the other affected command paths. This issue is fixed in version 2.97.0.

Weakness: CWE-150 (Improper Neutralization of Escape, Meta, or Control Sequences)

## Which versions are affected by CVE-2026-64654?


## How do I fix CVE-2026-64654?

Upgrade to a fixed version.

## Is CVE-2026-64654 being exploited?

There is no known exploitation of CVE-2026-64654 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-64654 and fix it if it is affected.

What it is: CVE-2026-64654 is a medium-severity command injection vulnerability in cli, published on 6 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-64654 in the wild and no public exploit code.

Affected product: cli. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-64654/ (Markdown: https://insights.sbomify.com/CVE-2026-64654/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-64654
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-64654
- OSV: https://osv.dev/vulnerability/CVE-2026-64654

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-64654/
Summaries are generated and may contain mistakes; the official description above is the record.
