Oh My Posh: Arbitrary command execution via template injection in the path segment
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-1336.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| JanDeDobbeleer | oh-my-posh | before 29.35.1 | 29.35.1 | Patch available | CNA |
| — | github.com/jandedobbeleer/oh-my-posh (Go) | before 29.35.1 | 29.35.1 | Patch available | GHSA-6xj8-qv9j-xcjq |
- oh-my-posh VendorJanDeDobbeleer Affected before 29.35.1 Fixed in 29.35.1 Patch available CNA
- github.com/jandedobbeleer/oh-my-posh (Go) Vendor— Affected before 29.35.1 Fixed in 29.35.1 Patch available GHSA-6xj8-qv9j-xcjq
Remediation
- Fix · CNA oh-my-posh (JanDeDobbeleer) Fixed in 29.35.1
- Fix · GHSA-6xj8-qv9j-xcjq github.com/jandedobbeleer/oh-my-posh (Go) Fixed in 29.35.1 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2026-73505
- 2026-10-03 Alias added: GHSA-6xj8-qv9j-xcjq
References
Other 6
- https://github.com/JanDeDobbeleer/oh-my-posh/security/advisories/GHSA-6xj8-qv9j-xcjq
- https://github.com/JanDeDobbeleer/oh-my-posh/pull/7711
- https://github.com/JanDeDobbeleer/oh-my-posh/commit/88ddbe0b0a4dd13cc345996108c9869493f2c690
- https://github.com/JanDeDobbeleer/oh-my-posh/releases/tag/v29.35.1
- https://github.com/JanDeDobbeleer/oh-my-posh
- https://github.com/JanDeDobbeleer/oh-my-posh/releases/tag/v29.36.0
More JanDeDobbeleer vulnerabilities
- TI-2026-51616 Oh My Posh: Terminal escape sequence injection via unsanitized prompt segment data CVSS 3.1MEDIUM 6.1
Sources
- CVE-2026-73505 · CVE Program
- CVE-2026-73505 · NVD
- FIRST EPSS
- GHSA-6xj8-qv9j-xcjq · GitHub Advisory Database · CC BY 4.0
- CVE-2026-73505 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences