{"id":"CVE-2026-45803","aliases":["CVE-2026-45803","GHSA-crc3-h8v6-qh57","GO-2026-5335"],"related":[],"kind":"vulnerability","state":"published","title":"gh: GitHub Actions log output in `gh run view` allows terminal escape sequence injection","summary":"`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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"`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.","source":"cvelist"},{"lang":"en","text":"### 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","format":"markdown","source":"ghsa"},{"lang":"en","text":"GitHub CLI: GitHub Actions log output in `gh run view` allows terminal escape sequence injection in github.com/cli/cli","format":"markdown","source":"go"},{"lang":"es","text":"’gh’ es la herramienta oficial de línea de comandos de GitHub. Desde la versión 1.6.0 hasta antes de la 2.92.0, se ha identificado una vulnerabilidad de seguridad en GitHub CLI que podría permitir la inyección de secuencias de escape de terminal cuando los usuarios ven los registros de flujo de trabajo de GitHub Actions usando ’gh run view --log’ o ’gh run view --log-failed’. La vulnerabilidad se origina en la forma en que GitHub CLI maneja la salida de registro sin procesar de Actions. Los comandos ’gh run view --log’ y ’gh run view --log-failed’ transmiten líneas de registro de flujo de trabajo a stdout o al paginador configurado sin sanear las secuencias de control de terminal. Un atacante que puede influir en el contenido del registro de GitHub Actions, por ejemplo a través de un flujo de trabajo activado por una PR, puede incrustar secuencias de escape que se reproducen en la terminal del usuario cuando inspeccionan la ejecución. Dependiendo del emulador de terminal de la víctima, las secuencias inyectadas podrían cambiar el título de la ventana, manipular el contenido en pantalla, o en algunos emuladores de terminal (como screen) potencialmente ejecutar comandos arbitrarios. Esta vulnerabilidad se corrige en la versión 2.92.0.","source":"nvd"}],"published":"2026-05-15T15:26:56.675Z","modified":"2026-11-11T20:10:00.273Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N","score":3.5,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N","score":3.5,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N","score":3.5,"rating":"LOW"}],"cwes":["CWE-150"],"affected":[{"ranges":[{"version":">= 1.6.0, < 2.92.0","status":"affected"}],"vendor":"cli","product":"cli","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.92.0"}],"ecosystem":"Go","package":"github.com/cli/cli/v2","purl":"pkg:golang/github.com/cli/cli/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.6.0","status":"affected","lastAffected":"1.14.0"}],"ecosystem":"Go","package":"github.com/cli/cli","purl":"pkg:golang/github.com/cli/cli","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.6.0","status":"affected"}],"ecosystem":"Go","package":"github.com/cli/cli","purl":"pkg:golang/github.com/cli/cli","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.92.0"}],"ecosystem":"Go","package":"github.com/cli/cli/v2","purl":"pkg:golang/github.com/cli/cli/v2","source":"go"},{"ranges":[{"status":"affected","introduced":"1.6.0","fixed":"2.92.0"}],"vendor":"github","product":"cli","cpe":"cpe:2.3:a:github:cli:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/cli/cli/security/advisories/GHSA-crc3-h8v6-qh57","tags":["advisory","exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45803","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/cli/cli","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-05-15T17:47:37.269Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45803","url":"https://www.cve.org/CVERecord?id=CVE-2026-45803","licence":"CVE Terms of Use","modified":"2026-05-15T17:48:01.444Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-crc3-h8v6-qh57","url":"https://github.com/advisories/GHSA-crc3-h8v6-qh57","licence":"CC-BY-4.0","modified":"2026-06-25T19:56:33.425Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5335","url":"https://pkg.go.dev/vuln/GO-2026-5335","licence":"CC-BY-4.0","modified":"2026-06-25T19:45:31.832Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45803","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45803","licence":"Public domain","modified":"2026-11-11T20:10:00.273Z"}],"updatedAt":"2026-11-25T22:59:21.817Z","epss":{"score":0.00311,"percentile":0.16462,"date":"2026-11-30T12:00:22.000Z"}}