Vulnerability · Published Aug 13, 2026 · Assigned by GitHub_M
CVE-2026-73505Oh My Posh: Arbitrary command execution via template injection in the path segment
High 7.8
In plain English
A high-severity code injection in oh-my-posh from JanDeDobbeleer. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 12% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/jandedobbeleer/oh-my-posh | 29.35.1 | GHSA-6xj8-qv9j-xcjq |
| Go | github.com/jandedobbeleer/oh-my-posh | 29.35.1+incompatible | GO-2026-6108 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| JanDeDobbeleer | oh-my-posh | < 29.35.1 |
Weakness: CWE-94, CWE-1336 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
References
- https://github.com/JanDeDobbeleer/oh-my-posh/security/advisories/GHSA-6xj8-qv9j-xcjq x_refsource_CONFIRM
- https://github.com/JanDeDobbeleer/oh-my-posh/pull/7711 x_refsource_MISC
- https://github.com/JanDeDobbeleer/oh-my-posh/commit/88ddbe0b0a4dd13cc345996108c9869493f2c690 x_refsource_MISC
- https://github.com/JanDeDobbeleer/oh-my-posh/releases/tag/v29.35.1 x_refsource_MISC