CVE-2026-73506 is a medium-severity (CVSS 6.1) CWE-150 vulnerability in github.com/jandedobbeleer/oh-my-posh. A fix is available for github.com/jandedobbeleer/oh-my-posh — see the affected versions and patch details below.
Oh My Posh: Terminal escape sequence injection via unsanitized prompt segment data
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-73506.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2026-73506 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 380,526 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
github.com/jandedobbeleer/oh-my-poshReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Summary
Oh My Posh renders dynamic, potentially attacker-controlled strings (the current directory name, Git commit metadata, environment variable values, command output) into the prompt without neutralizing raw terminal control characters. An attacker who controls one of these values can inject ANSI/OSC escape sequences that the victim's terminal executes on every prompt render. (This is separate from the path-segment command-execution report; it has a different root cause and fix.)
Details
src/terminal/writer.go, write(s rune): the literal characters of rendered segment content are emitted to the output buffer, and the only neutralization is a lookup in formats.EscapeSequences, which per shell contains only the shell's prompt-length markers (\ for bash, % for zsh, nothing for fish/pwsh/cmd/nu). Raw C0/C1 control bytes (ESC 0x1b, BEL 0x07, CSI, OSC) are written verbatim.
Oh My Posh's own styling is emitted through separate paths (writeEscapedAnsiString, writeColorise, builder.WriteString(formats.Hyperlink...)), so any control rune reaching write(s rune) originates from rendered data. trimAnsi is already applied to the console title (FormatTitle) but not to the prompt body.
Attacker-controlled sources (both verified)
- Current directory name (default config, Linux/macOS). Directory names may contain any byte except
/and NUL, including0x1b. The path segment renders the working directory in every theme. - Git commit subject / author / upstream URL (cross-platform, including Windows).
Git.Commit()runsgit log -1 --pretty=format:...su:%s...and exposes.Commit.Subject,.Commit.Author.Name/.Emailand.RawUpstreamURL; Git imposes no restriction on these, so they can carry raw escape sequences.
PoC
Git commit-subject vector (config: a single git segment with template {{ .Commit.Subject }}):
printf 'feat: \033]0;HACKED\007\033]52;c;ZWNobyBQV05FRA==\007 update' > msg.txt
git commit --allow-empty -F msg.txt
oh-my-posh print primary --config poc.omp.json --shell fish | xxd
Output (excerpt) shows the attacker's OSC 0 (set title) and OSC 52 (clipboard write) passed through unmodified, wrapped only in Oh My Posh's colors:
...255m feat: 1b5d 303b 4841 434b 4544 07 1b5d 3532 3b63 3b5a 574e ... 07 ...
ESC ] 0 ; H A C K E D BEL ESC ] 5 2 ; c ; <base64> BEL
The directory-name vector reproduces identically via the path segment.
Impact
The terminal interprets the injected sequences on every render, enabling, per emulator: clipboard hijacking (OSC 52 write, so a command placed in the clipboard runs when the victim pastes), prompt/screen spoofing, window-title manipulation, and terminal denial of service. Delivery is remote (repo/archive/share); execution is local when the prompt renders after cd.
Suggested fix: neutralize C0/C1 control characters in untrusted segment data before it reaches the terminal, at minimum the path segment (folder names) and the git segment (Commit.Subject, Commit.Author.*, RawUpstreamURL). trimAnsi already exists and is applied to the title; extending equivalent handling to segment data closes the gap. Filtering control runes in write(s rune) would also work as defense in depth (Oh My Posh's own styling never flows through that function), optionally behind an opt-out for users who deliberately embed escapes in their own templates.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/jandedobbeleer/oh-my-posh | all versions | 29.35.1go get github.com/jandedobbeleer/oh-my-posh@v29.35.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/jandedobbeleer/oh-my-posh, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/jandedobbeleer/oh-my-posh to 29.35.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-73506 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Oh My Posh is not shipped in any Red Hat product. It is available in Fedora as a community package.
Update to Oh My Posh version 29.35.1 or later. As a workaround, avoid navigating to untrusted git repositories or directories with untrusted names while using Oh My Posh as your prompt renderer.Source: Red Hat security advisory for CVE-2026-73506 (CC BY 4.0)
Frequently Asked Questions
Is CVE-2026-73506 in your dependencies?
Find it across Go, including transitive dependencies.