CVE-2026-64654

Description

A flaw was found in GitHub CLI (gh). Multiple commands within the tool fail to neutralize terminal escape sequences when displaying externally controlled content. An attacker who can influence this content can embed malicious escape sequences. These sequences are then interpreted by a user's terminal, potentially leading to cosmetic manipulation of the display or, in some terminal emulators, arbitrary command execution.

Statement

A flaw was found in GitHub CLI (gh). Terminal escape sequences in responses from GitHub API endpoints are not sanitized before display, allowing an attacker who controls repository metadata (e.g. issue titles, PR descriptions) to inject terminal escape sequences that may execute arbitrary commands when a user runs gh commands in a vulnerable terminal emulator. Red Hat products that include github.com/cli/cli as a transitive Go dependency (OpenShift GitOps, OpenStack Platform) are not affected because the gh CLI is not invoked and terminal output is not rendered.

Mitigation

- Upgrade `gh` to version 2.97.0 or later.
- Be cautious when running `gh` commands against untrusted repositories. Use a terminal emulator that does not execute escape sequences automatically.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score6.7N/AN/A
Attack VectorLocalN/AN/A
Attack ComplexityHighN/AN/A
Privileges RequiredLowN/AN/A
User InteractionRequiredN/AN/A
ScopeUnchangedN/AN/A
ConfidentialityHighN/AN/A
Integrity ImpactHighN/AN/A
Availability ImpactHighN/AN/A

Vector

Red Hat: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H

Understanding the Weakness (CWE)

Confidentiality,Integrity,Availability,Non-Repudiation

Technical Impact: Execute Unauthorized Code or Commands; DoS: Crash, Exit, or Restart; Read Files or Directories; Modify Files or Directories; Read Application Data; Modify Application Data; Hide Activities

Attackers could execute unauthorized operating system commands, which could then be used to disable the product, or read and modify data for which the attacker does not have permissions to access directly. Since the targeted application is directly executing the commands instead of the attacker, any malicious activities may appear to come from the application or the application's owner.

Frequently Asked Questions

Want to get errata notifications? Sign up here.