GHSA-crc3-h8v6-qh57 — v2
LOWGHSA-crc3-h8v6-qh57 is a low-severity (CVSS 3.5) CWE-150 vulnerability in github.com/cli/cli/v2. A fix is available for github.com/cli/cli/v2 — see the affected versions and patch details below.
GitHub CLI: GitHub Actions log output in `gh run view` allows terminal escape sequence injection
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-crc3-h8v6-qh57.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-crc3-h8v6-qh57 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 381,682 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
github.com/cli/cli/v2🐹github.com/cli/cliReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Summary
A security vulnerability has been identified in GitHub CLI that could allow terminal escape sequence injection when users view GitHub Actions workflow logs using gh run view --log or gh run view --log-failed.
Details
The vulnerability stems from the way GitHub CLI handles raw Actions log output. The gh run view --log and gh run view --log-failed commands stream workflow log lines to stdout or the configured pager without sanitizing terminal control sequences. An attacker who can influence GitHub Actions log content, for example via a PR triggered workflow, can embed escape sequences that are replayed in the user's terminal when they inspect the run.
Depending on the victim's terminal emulator, injected sequences could change the window title, manipulate on screen content, or in some terminal emulators (such as screen) potentially execute arbitrary commands.
In 2.92.0, GitHub CLI sanitizes terminal control sequences in Actions log output before writing to the terminal.
PoC
Create a workflow that emits terminal escape sequences in its log output:
name: Escape Sequence PoC
on:
workflow_dispatch:
jobs:
emit-escape-sequences:
runs-on: ubuntu-latest
steps:
- name: Emit terminal escape sequences
run: |
# OSC title set
printf 'ESCAPE_MARKER_START \033]0;HIJACKED_TITLE\007 ESCAPE_MARKER_END\n'
# CSI color
printf 'ESCAPE_MARKER_START \033[31mRED_TEXT\033[0m ESCAPE_MARKER_END\n'
# Screen title set (enables command execution in screen terminal)
printf 'ESCAPE_MARKER_START \033k;malicious command;\033\\ ESCAPE_MARKER_END\n'
Then trigger the workflow and view its logs:
gh workflow run 'Escape Sequence PoC'
gh run view <run_id> --log
On vulnerable versions, the raw ESC bytes (0x1b) are passed through to the terminal unsanitized. On 2.92.0 and later, escape sequences are stripped and only the safe visible text is displayed.
Impact
An attacker who can control GitHub Actions workflow output can inject terminal escape sequences into a maintainer's terminal session when they inspect the run with gh run view --log or gh run view --log-failed. The practical impact depends on the victim's terminal emulator.
Remediation and Mitigation
- Upgrade
ghto2.92.0 - Pipe log output through a sanitizer (e.g.,
gh run view --log | cat -v) as a workaround on older versions - Exercise caution when viewing logs from untrusted workflow runs
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/cli/cli/v2 | all versions | 2.92.0go get github.com/cli/cli/v2@v2.92.0 |
| 🐹Go | github.com/cli/cli | ≥ 1.6.0 | No fix |
Affected Products
cligithubDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/cli/cli/v2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/cli/cli/v2 to 2.92.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-crc3-h8v6-qh57 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Red Hat Product Security rates this issue as having a Low security impact. This issue results from insufficient sanitization of terminal control sequences in GitHub Actions workflow logs displayed by GitHub CLI. An attacker with the ability to influence workflow log output may inject terminal escape sequences that are…
As a workaround, log output can be sanitized before display, for example: ``` gh run view --log | cat -v ``` Users should exercise caution when viewing logs generated from untrusted workflow runs.Source: Red Hat security advisory for GHSA-crc3-h8v6-qh57 (CC BY 4.0)
Frequently Asked Questions
Is GHSA-crc3-h8v6-qh57 in your dependencies?
Find it across Go, including transitive dependencies.