CVE-2026-45803 Overview
CVE-2026-45803 is a terminal escape sequence injection vulnerability in GitHub CLI (gh), GitHub's official command line tool. The flaw affects versions from 1.6.0 to before 2.92.0. When users run gh run view --log or gh run view --log-failed to inspect GitHub Actions workflow logs, the CLI streams raw log output to stdout or the configured pager without sanitizing terminal control sequences. An attacker who can influence Actions log content, such as through a pull request triggered workflow, can embed escape sequences that execute when a victim reviews the run. The issue is tracked under CWE-150 and is fixed in version 2.92.0.
Critical Impact
Injected escape sequences can alter terminal window titles, manipulate on-screen content, and in some emulators such as screen, potentially execute arbitrary commands on the viewer's host.
Affected Products
- GitHub CLI (gh) versions 1.6.0 through 2.91.x
- GitHub Actions workflow log consumers using vulnerable gh releases
- Terminal emulators rendering unsanitized control sequences (including screen)
Discovery Timeline
- 2026-05-15 - CVE-2026-45803 published to NVD
- 2026-05-18 - Last updated in NVD database
Technical Details for CVE-2026-45803
Vulnerability Analysis
The vulnerability stems from how GitHub CLI processes raw output from the Actions logs API. The gh run view --log and gh run view --log-failed subcommands forward log bytes directly to the user's terminal or pager. The client performs no filtering of ANSI escape sequences, OSC commands, or other control characters embedded in log lines.
GitHub Actions logs frequently contain attacker-controlled data. Any step that prints user input, repository content, or pull request metadata becomes a vehicle for injection. When the victim inspects the run output locally, the terminal interprets embedded sequences as commands rather than text. This converts a log review action into a client-side execution primitive scoped to the capabilities of the rendering terminal.
Root Cause
The root cause is missing neutralization of CRLF and control sequences in output destined for an interactive terminal, classified under CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences. The CLI treats Actions log streams as trusted byte streams instead of untrusted content requiring sanitization before display.
Attack Vector
An attacker authors a workflow step, pull request, or any input that lands in Actions log output. The payload contains escape sequences such as OSC title-setting codes, cursor manipulation codes, or terminal-specific command injection sequences targeting emulators like GNU screen. When a maintainer or developer runs gh run view --log against the affected run, the terminal renders the payload. Impact ranges from cosmetic title changes and overwritten screen regions to arbitrary command execution on terminals that expose execution-capable control sequences. Exploitation requires user interaction and low privileges on the attacker side, consistent with the published CVSS vector.
No verified proof-of-concept code is available. See the GitHub Security Advisory GHSA-crc3-h8v6-qh57 for vendor technical details.
Detection Methods for CVE-2026-45803
Indicators of Compromise
- Unexpected changes to terminal window titles immediately after running gh run view --log or gh run view --log-failed
- Workflow log lines containing ESC (0x1B) bytes, OSC sequences (ESC ]), or CSI sequences (ESC [) originating from pull request controlled steps
- Shell history entries showing commands the user did not type following a gh run view invocation
Detection Strategies
- Scan local gh binaries and CI runner images for installed versions below 2.92.0
- Inspect Actions workflow definitions that print untrusted input such as PR titles, branch names, or commit messages without escaping
- Pipe gh run view --log output through a control-character filter such as cat -v or sed 's/\\x1b/^[/g' during review to surface embedded sequences
Monitoring Recommendations
- Track GitHub CLI version inventory across developer workstations and build systems
- Alert on execution of gh run view --log against workflow runs triggered by external pull requests
- Forward terminal session logs from privileged developer hosts to a centralized log store for retrospective analysis
How to Mitigate CVE-2026-45803
Immediate Actions Required
- Upgrade GitHub CLI to version 2.92.0 or later on all developer endpoints, CI runners, and container images
- Audit recent uses of gh run view --log and gh run view --log-failed against runs from untrusted contributors
- Restrict execution of workflows triggered by external pull requests in repositories with sensitive maintainer activity
Patch Information
GitHub fixed the issue in gh release 2.92.0. The patched version sanitizes terminal control sequences before writing Actions log output to stdout or the pager. Refer to the GitHub Security Advisory GHSA-crc3-h8v6-qh57 for release notes and patch details.
Workarounds
- Avoid running gh run view --log or gh run view --log-failed until upgrading; review logs through the GitHub web UI instead
- Redirect CLI output through a sanitizer, for example gh run view --log | cat -v, to neutralize escape sequences
- Configure a pager such as less -R only with explicit awareness of its handling of control characters, or disable colorized pagers when reviewing untrusted runs
# Configuration example
# Upgrade gh on macOS via Homebrew
brew update && brew upgrade gh
# Upgrade gh on Debian/Ubuntu
sudo apt update && sudo apt install --only-upgrade gh
# Verify the installed version is 2.92.0 or later
gh --version
# Safer log review until all systems are patched
gh run view <run-id> --log | cat -v
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


