CVE-2026-45803: gh: GitHub Actions log output in `gh run view` allows terminal escape sequence injection

Published May 15, 2026
·
Updated

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:

yaml name: Escape Sequence PoC

on: workflowdispatch:

jobs: emit-escape-sequences: runs-on: ubuntu-latest steps: - name: Emit terminal escape sequences run: | # OSC title set printf 'ESCAPEMARKERSTART \033]0;HIJACKEDTITLE\007 ESCAPEMARKEREND\n' # CSI color printf 'ESCAPEMARKERSTART \033[31mREDTEXT\033[0m ESCAPEMARKEREND\n' # Screen title set (enables command execution in screen terminal) printf 'ESCAPEMARKERSTART \033k;malicious command;\033\\ ESCAPEMARKEREND\n'

Then trigger the workflow and view its logs:

bash gh workflow run 'Escape Sequence PoC' gh run view <runid> --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

1. Upgrade gh to 2.92.0 2. Pipe log output through a sanitizer (e.g., gh run view --log | cat -v) as a workaround on older versions 3. Exercise caution when viewing logs from untrusted workflow runs

Other sources

gh is GitHub’s official command line tool. From 1.6.0 to before 2.92.0, 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. 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. This vulnerability is fixed in 2.92.0.

MITRE

gh: GitHub Actions log output in gh run view allows terminal escape sequence injection

Microsoft

Affected Software

6 affected componentsFixes available
GitHub GitHub CLI>=1.6.0<2.92.0
go/github.com/cli/cli>=1.6.0<=1.14.0
go/github.com/cli/cli/v2<2.92.0
2.92.0
GitHub CLI>=1.6.0<2.92.0
Microsoft azl3 gh 2.62.0-17<2.62.0-18
2.62.0-18
Microsoft azl3 gh 2.62.0-18<2.62.0-18
2.62.0-18

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/cli/cli/v2 to a version that resolves this vulnerability.

    Fixed in 2.92.0
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.62.0-18
  3. Upgrade

    Upgrade github-cli/gh to a version that resolves this vulnerability.

    Fixed in 2.92.0
  4. Configuration

    Do not view untrusted GitHub Actions log output with `gh run view --log` or `gh run view --log-failed` on vulnerable GitHub CLI versions (from 1.6.0 to before 2.92.0). Upgrade to 2.92.0 where escape sequences are stripped and only safe visible text is displayed.

    Terminal/terminal pager usage for `gh run view --log*` terminal control sequence handling = sanitize/strip escape sequences (upgrade to v2.92.0)
  5. Compensating control

    On versions before 2.92.0, pipe log output through a sanitizer workaround when using GitHub CLI: run `gh run view --log | cat -v` (and similarly for `gh run view --log-failed`).

Event History

May 15, 2026
CVE Published
via MITRE·03:26 PM
Data Sourced
via MITRE·03:26 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:16 PM
DescriptionSeverityWeaknessAffected Software
May 19, 2026
Advisory Published
via GitHub·07:37 PM
Data Sourced
via GitHub·07:37 PM
DescriptionSeverityWeaknessAffected Software
May 21, 2026
Data Sourced
via Microsoft·08:03 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:03 AM
Affected Software
Updated
via Microsoft·08:03 AM
DescriptionSeverity
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-45803?

CVE-2026-45803 has been classified as a medium severity vulnerability.

2

How do I fix CVE-2026-45803?

To fix CVE-2026-45803, upgrade GitHub CLI to version 2.92.0 or later.

3

What is the impact of CVE-2026-45803?

CVE-2026-45803 allows terminal escape sequence injection, which can lead to unintended command execution.

4

Which versions of GitHub CLI are affected by CVE-2026-45803?

GitHub CLI versions from 1.6.0 to before 2.92.0 are affected by CVE-2026-45803.

5

Is CVE-2026-45803 specific to certain operating systems?

CVE-2026-45803 affects GitHub CLI across various operating systems where the affected versions are installed.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203