Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Oh My Posh: Terminal escape sequence injection via unsanitized prompt segment data

0
Medium
Published: 07/24/2026 (07/24/2026, 22:35:52 UTC)
Source: GCVE Database
Product: github.com/jandedobbeleer/oh-my-posh

Description

Oh My Posh versions prior to 29.35.1 allow terminal escape sequence injection via unsanitized prompt segment data. The software renders dynamic strings such as current directory names and Git commit metadata 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. This can lead to clipboard hijacking, prompt spoofing, window-title manipulation, and terminal denial of service. The vulnerability arises because control characters are emitted verbatim in prompt segments without proper filtering. The issue affects local terminal rendering and requires the victim to render the prompt after changing directories or viewing Git data. No official patch or fix is currently confirmed.

CVSS v3.1

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
Low
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L

Affected software

Goghsa
github.com/jandedobbeleer/oh-my-posh
Affected versions
<29.35.1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/25/2026, 23:49:27 UTC

Technical Analysis

Oh My Posh renders dynamic, potentially attacker-controlled strings (e.g., current directory name, Git commit metadata) into the terminal prompt without neutralizing 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 ANSI/OSC escape sequences. These sequences are executed by the victim's terminal on every prompt render. Verified attacker-controlled sources include directory names and Git commit metadata fields (subject, author, upstream URL). The impact includes clipboard hijacking via OSC 52, prompt and screen spoofing, window-title manipulation, and terminal denial of service. The vulnerability affects Oh My Posh versions before 29.35.1. The suggested remediation is to neutralize control characters in untrusted segment data before rendering, extending existing ANSI trimming to prompt segments.

Potential Impact

The injected terminal escape sequences are executed locally on the victim's terminal each time the prompt renders. This can enable clipboard hijacking (inserting attacker-controlled content into the clipboard), spoofing of the prompt or terminal screen, manipulation of the terminal window title, and denial of service conditions in the terminal emulator. The attack requires the victim to render the prompt with attacker-controlled data, such as changing into a directory with a malicious name or viewing Git commit metadata crafted by an attacker. The impact is limited to local terminal effects and depends on the terminal emulator's support for these escape sequences.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The suggested fix is to neutralize C0/C1 control characters in untrusted prompt segment data before it is rendered to the terminal, specifically in the path segment (directory names) and Git segment (commit subject, author, upstream URL). Existing ANSI trimming applied to console titles should be extended to prompt body segments. Filtering control runes in the write function would provide defense in depth. Until an official fix is released, users should avoid rendering untrusted data in their prompt segments or sanitize such data manually.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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: 07/25/2026, 23:49:27 UTC

Last updated: 07/25/2026, 23:49:27 UTC

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses