CVE-2026-45803: GitHub CLI: GitHub Actions log output in `gh run view` allows terminal escape sequence injection
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.
Published May 19, 2026
Affected packages
github.com/cli/cli/v2
- Ecosystem
- Go
- Affected
- < 2.92.0
- Fixed in
- 2.92.0
- Check
go list -m github.com/cli/cli/v2
github.com/cli/cli
- Ecosystem
- Go
- Affected
- >= 1.6.0, <= 1.14.0
- Fixed in
- No patched version yet
- Check
go list -m github.com/cli/cli
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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> --logOn 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
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-64652
GitHub CLI partially discloses authentication tokens in `gh auth status` output
low3.3Oct 15, 2026CVE-2026-64653
GitHub CLI allows path traversal through unescaped request URL components
low2.1Oct 15, 2026CVE-2026-64655
GitHub CLI allows attestation verification bypass through unescaped regex metacharacters
low2.1Oct 15, 2026CVE-2026-48501
GitHub CLI has an incorrect authorization header in API requests to TUF repository mirrors via `gh attestation`, `gh release verify`, and `gh release verify-asset` commands
high7.4May 29, 2026CVE-2025-25204
`gh attestation verify` returns incorrect exit code during verification if no attestations are present
medium6.3Feb 14, 2025CVE-2024-54132
Downloading malicious GitHub Actions workflow artifact results in path traversal vulnerability
medium6.3No fixDec 4, 2024
