Oh My Posh: Terminal escape sequence injection via unsanitized prompt segment data (CVE-2026-73506)
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.
AI Analysis
Technical 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.
Potential 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.
Mitigation Recommendations
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.
Oh My Posh: Terminal escape sequence injection via unsanitized prompt segment data (CVE-2026-73506)
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.
CVSS v3.1
Score 6.1medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
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.
Potential 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.
Mitigation Recommendations
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.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-fwjx-9p69-h25h
- Osv Schema Version
- 1.4.0
- Aliases
- []
- Ecosystems
- ["Go"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a6542199c2644c7f8087e3e
Added to database: 07/25/2026, 23:09:13 UTC
Last enriched: 08/13/2026, 19:48:12 UTC
Last updated: 09/09/2026, 07:57:33 UTC
Views: 90
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.