Vulnerabilities in pkg:golang/github.com/cli/cli

PACKAGE
Advisory Identifier: GHSA-crc3-h8v6-qh57
Advisory Summary

CVE-2026-45803 is a LOW (CVSS 3.5) github actions log output vulnerability (CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences) affecting GitHub CLI libraries in the Go ecosystem. The issue involves github actions log output in `gh run view` allows terminal escape sequence injection. Remediation is available by upgrading affected packages to version 2.92.0.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/cli/cli

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/cli/cli. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-crc3-h8v6-qh57 CVE-2026-45803 LOW GitHub CLI: GitHub Actions log output in `gh run view` allows terminal escape sequence injection
GHSA-2m9h-r57g-45pj CVE-2024-54132 MODERATE Downloading malicious GitHub Actions workflow artifact results in path traversal vulnerability
GHSA-p2h2-3vg9-4p87 CVE-2024-52308 HIGH Connecting to a malicious Codespaces via GH CLI could allow command execution on the user's computer
GHSA-fqfh-778m-2v32 - MODERATE GitHub CLI can execute a git binary from the current directory

CVE-2026-45803 at a Glance

CVE Identifier CVE-2026-45803
GHSA Identifier GHSA-crc3-h8v6-qh57
Severity LOW
CVSS v3.1 Base Score 3.5
CWE Classification CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences
Affected Product GitHub CLI
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 3.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-45803

To remediate this vulnerability, upgrade all affected GitHub CLI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/cli/cli/v2 fixed: 2.92.0
Upgrade github.com/cli/cli/v2 to 2.92.0
github.com/cli/cli fixed: Latest secure release
Upgrade github.com/cli/cli to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/cli/cli/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-45803, inspect your project dependencies for GitHub CLI:

inspect dependencies for github.com/cli/cli/v2

Analyze the terminal output to locate any version of GitHub CLI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.92.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences, where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as escape, meta, or control character sequences when they are sent to a downstream component. In GitHub CLI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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: 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: ```bash 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 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

CVE-2026-45803 Affected GitHub CLI Versions

2 component(s)
Fixed Versions:
2.92.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cli/cli/v2
Go
< 2.92.0
2.92.0
github.com/cli/cli
Go
≥ 1.6.0
≤ 1.14.0

References

Frequently Asked Questions

What is CVE-2026-45803?
CVE-2026-45803 is a security vulnerability in GitHub CLI involving GitHub Actions log output in `gh run view` allows terminal escape sequence injection under CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences.
Which GitHub CLI versions are affected?
Affected versions include releases prior to 2.92.0 across affected packages: github.com/cli/cli/v2, github.com/cli/cli.
What version fixes CVE-2026-45803?
Upgrading to 2.92.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/cli/cli/v2 affected?
Yes, github.com/cli/cli/v2 is affected in releases prior to 2.92.0. Upgrade your dependency to 2.92.0 or later.
Is github.com/cli/cli affected?
Yes, github.com/cli/cli is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-45803?
CVE-2026-45803 has a CVSS v3.1 base score of 3.5 (LOW) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-45803?
CVE-2026-45803 is classified under CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences (The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as escape, meta, or control character sequences when they are sent to a downstream component.).
How can I check Go dependencies for CVE-2026-45803?
Run the dependency tree command: 'inspect dependencies for github.com/cli/cli/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-crc3-h8v6-qh57",
  "modified" : "2026-05-19T19:37:01Z",
  "published" : "2026-05-19T19:37:01Z",
  "aliases" : [ "CVE-2026-45803" ],
  "summary" : "GitHub CLI: GitHub Actions log output in `gh run view` allows terminal escape sequence injection",
  "details" : "### Summary\n\nA 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`.\n\n### Details\n\nThe 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.\n\nDepending 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.\n\nIn `2.92.0`, GitHub CLI sanitizes terminal control sequences in Actions log output before writing to the terminal.\n\n### PoC\n\nCreate a workflow that emits terminal escape sequences in its log output:\n\n```yaml\nname: Escape Sequence PoC\n\non:\n  workflow_dispatch:\n\njobs:\n  emit-escape-sequences:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Emit terminal escape sequences\n        run: |\n          # OSC title set\n          printf 'ESCAPE_MARKER_START \\033]0;HIJACKED_TITLE\\007 ESCAPE_MARKER_END\\n'\n          # CSI color\n          printf 'ESCAPE_MARKER_START \\033[31mRED_TEXT\\033[0m ESCAPE_MARKER_END\\n'\n          # Screen title set (enables command execution in screen terminal)\n          printf 'ESCAPE_MARKER_START \\033k;malicious command;\\033\\\\ ESCAPE_MARKER_END\\n'\n```\n\nThen trigger the workflow and view its logs:\n\n```bash\ngh workflow run 'Escape Sequence PoC'\ngh run view <run_id> --log\n```\n\nOn 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.\n\n### Impact\n\nAn 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.\n\n### Remediation and Mitigation\n\n1. Upgrade `gh` to `2.92.0`\n2. Pipe log output through a sanitizer (e.g., `gh run view --log | cat -v`) as a workaround on older versions\n3. Exercise caution when viewing logs from untrusted workflow runs",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cli/cli/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.92.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cli/cli"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.6.0"
      }, {
        "last_affected" : "1.14.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cli/cli/security/advisories/GHSA-crc3-h8v6-qh57"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45803"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cli/cli"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-150" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-19T19:37:01Z",
    "nvd_published_at" : "2026-05-15T16:16:15Z"
  }
}