CVE-2026-73505: CWE-94: Improper Control of Generation of Code ('Code Injection') in JanDeDobbeleer oh-my-posh
Oh My Posh is the most customisable and low-latency cross platform/shell prompt renderer. Prior to 29.35.1, the setStyle() function in src/segments/path.go passed pt.Path, which includes raw folder names, to template.Render, whose function map exposes cmd, so an attacker-controlled directory name containing a Go template expression could execute arbitrary operating system commands as the current user whenever the prompt rendered inside that directory or a descendant. This issue is fixed in version 29.35.1.
AI Analysis
Technical Summary
Oh My Posh versions before 29.35.1 have a vulnerability in the setStyle() function in src/segments/path.go, where the pt.Path variable, including raw folder names, is passed to template.Render. The function map exposed by template.Render includes 'cmd', enabling an attacker to inject Go template expressions via directory names. When the prompt renders in such a directory, arbitrary OS commands can be executed with the current user's privileges. This is a code injection vulnerability classified under CWE-94 and CWE-1336. The vulnerability is resolved in version 29.35.1.
Potential Impact
An attacker who can control directory names can execute arbitrary operating system commands as the current user when the prompt renders in the affected directory or its descendants. This can lead to full compromise of the user's environment, including confidentiality, integrity, and availability impacts.
Mitigation Recommendations
Upgrade oh-my-posh to version 29.35.1 or later, where this vulnerability is fixed. No other mitigation or workaround is indicated.
CVE-2026-73505: CWE-94: Improper Control of Generation of Code ('Code Injection') in JanDeDobbeleer oh-my-posh
Description
Oh My Posh is the most customisable and low-latency cross platform/shell prompt renderer. Prior to 29.35.1, the setStyle() function in src/segments/path.go passed pt.Path, which includes raw folder names, to template.Render, whose function map exposes cmd, so an attacker-controlled directory name containing a Go template expression could execute arbitrary operating system commands as the current user whenever the prompt rendered inside that directory or a descendant. This issue is fixed in version 29.35.1.
CVSS v3.1
Score 7.8high
Affected software
pkg:golang/github.com/jandedobbeleer/oh-my-poshRun 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
Technical Analysis
Oh My Posh versions before 29.35.1 have a vulnerability in the setStyle() function in src/segments/path.go, where the pt.Path variable, including raw folder names, is passed to template.Render. The function map exposed by template.Render includes 'cmd', enabling an attacker to inject Go template expressions via directory names. When the prompt renders in such a directory, arbitrary OS commands can be executed with the current user's privileges. This is a code injection vulnerability classified under CWE-94 and CWE-1336. The vulnerability is resolved in version 29.35.1.
Potential Impact
An attacker who can control directory names can execute arbitrary operating system commands as the current user when the prompt renders in the affected directory or its descendants. This can lead to full compromise of the user's environment, including confidentiality, integrity, and availability impacts.
Mitigation Recommendations
Upgrade oh-my-posh to version 29.35.1 or later, where this vulnerability is fixed. No other mitigation or workaround is indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-08-12T19:00:33.736Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a7ddecdbf8831d5395d0152
Added to database: 08/13/2026, 15:12:13 UTC
Last enriched: 08/13/2026, 15:26:18 UTC
Last updated: 08/13/2026, 17:45:38 UTC
Views: 4
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.