Oh My Posh: Terminal escape sequence injection via unsanitized prompt segment data (CVE-2026-73506)
Affects github.com/jandedobbeleer/oh-my-poshSource GCVE Database
Mentioned vulnerabilities
CVSS 6.1 Medium · fixed in 29.35.1 : update github.com/jandedobbeleer/oh-my-posh when convenient.
Data as of 08/13/2026, 19:48:12 UTC
- Patch
- Available – fixed in 29.35.1
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:LWhat to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Gogithub.com/jandedobbeleer/oh-my-posh | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available that neutralizes C0/C1 control characters in untrusted prompt segment data, specifically in the path segment (directory names) and Git segment (commit subject, author, upstream URL). Users should upgrade to version 29.35.1 or later. The existing 'trimAnsi' function applied to console titles has been extended to prompt segments to close this gap. No additional vendor advisory states otherwise.
Description
Oh My Posh versions prior to 29.35.1 allow terminal escape sequence injection via unsanitized prompt segment data. This occurs because dynamic strings such as directory names and Git commit metadata are rendered into the prompt without neutralizing raw terminal control characters. An attacker controlling these values can inject ANSI/OSC escape sequences that the victim's terminal executes on every prompt render, enabling clipboard hijacking, prompt spoofing, window-title manipulation, and denial of service.
Impact
The injected terminal escape sequences are executed locally on the victim's terminal each time the prompt renders, enabling clipboard hijacking (via OSC 52), prompt and screen spoofing, window-title manipulation, and potential terminal denial of service. The attack requires the victim to render the prompt with attacker-controlled data, which can be delivered remotely via repository or archive sharing. The vulnerability allows limited confidentiality, integrity, and availability impacts as indicated by the CVSS vector.
Summary
Oh My Posh renders dynamic, potentially attacker-controlled strings (e.g., current directory name, Git commit metadata) into the terminal prompt without sanitizing raw terminal control characters such as ESC, BEL, CSI, and OSC sequences. These control characters are emitted verbatim in the prompt output, allowing an attacker who controls these values to inject terminal escape sequences. Verified sources of attacker-controlled data include directory names and Git commit fields (subject, author, upstream URL). The injected sequences can manipulate the terminal environment, including clipboard contents and window titles, on every prompt render. The vulnerability affects Oh My Posh versions before 29.35.1. A patch is available to neutralize C0/C1 control characters in untrusted segment data before rendering.
Weaknesses
- CWE-150Improper Neutralization of Escape, Meta, or Control Sequences (opens in a new tab)
Variant weakness
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.
References
- github.com/JanDeDobbeleer/oh-my-posh/security/advisories/GHSA-fwjx-9p69-h25h (opens in a new tab)
- github.com/JanDeDobbeleer/oh-my-posh/commit/edcf3c88f3fb582e84358b385c49d33d04c04224 (opens in a new tab)
- github.com/JanDeDobbeleer/oh-my-posh (opens in a new tab)
- github.com/JanDeDobbeleer/oh-my-posh/releases/tag/v29.35.1 (opens in a new tab)
- github.com/JanDeDobbeleer/oh-my-posh/releases/tag/v29.36.0 (opens in a new tab)