Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCreate directory with template payload name
-
DeliveryVictim navigates into or below malicious directory
-
ExploitOh My Posh renders shell prompt
-
ExecutionsetStyle() passes raw path to template.Render
-
Persistcmd function executes attacker OS command
-
ImpactArbitrary code runs as victim user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The victim must be running Oh My Posh as their shell prompt renderer with any configuration containing a path segment - including the built-in default configuration. An attacker must be able to place a directory with a Go template expression in its name (e.g., |
| Impact | The CVSS 3.1 score of 7.8 (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) accurately reflects a local-vector, low-complexity attack requiring user interaction (victim must navigate into the malicious directory). The attack vector is local, meaning an attacker must be able to place a specially named directory somewhere the victim will navigate - achievable via shared filesystems, cloned repositories, downloaded archives, or social engineering. PR:N is appropriate because no elevated privileges are needed to create such a directory. A verified proof-of-concept is publicly documented in the GHSA advisory (GHSA-6xj8-qv9j-xcjq), demonstrating command execution via |
| Exploit ScenarioDerived | An attacker crafts a Git repository containing a directory named |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 13, 2026
Template injection in Oh My Posh prior to 29.35.1 allows arbitrary operating system command execution as the victim user when the shell prompt renders inside a directory whose name contains a Go template expression. The setStyle() function in src/segments/path.go passes raw filesystem path components - including untrusted directory names - directly into template.Render, whose function map exposes a cmd helper that invokes env.RunCommand. A publicly available proof-of-concept demonstrates command execution and file writes across Linux, macOS, and Windows. No active exploitation is confirmed in CISA KEV, but the attack surface includes any developer who cds into a maliciously named directory on a shared or attacker-influenced filesystem.
RemediationAI
Upgrade to Oh My Posh v29.35.1, which is the vendor-released patch resolving this issue. The fix is tracked at https://github.com/JanDeDobbeleer/oh-my-posh/releases/tag/v29.35.1 and the patching commit is https://github.com/JanDeDobbeleer/oh-my-posh/commit/88ddbe0b0a4dd13cc345996108c9869493f2c690. The fix introduces template.RenderTrusted for config-sourced templates, separating trusted (user-controlled config) rendering from untrusted (filesystem-derived) data. If immediate upgrade is not possible, avoid navigating into directories sourced from untrusted parties (e.g., cloned repositories, shared network drives, or downloaded archives) until patched. Disabling the path segment in the Oh My Posh configuration entirely eliminates the vulnerable code path but removes directory display from the prompt - a significant usability trade-off for most users. There is no known workaround that preserves path display functionality while mitigating the injection risk in unpatched versions.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Oh My Posh is a cross-platform, cross-shell prompt renderer written in Go (CPE: cpe:2.3:a:jandedobbeleer:oh-my-posh:*:*:*:*:*:*:*:*). The root cause is CWE-94 (Improper Control of Generation of Code), specifically Go template injection. The colorizePath function builds the prompt path string by inserting raw filesystem folder names verbatim via fmt.Sprintf(folderFormat, element). This string is then passed to template.Render, which parses and executes it using the full Go text/template function map defined in src/template/func_map.go. That function map includes a cmd function that calls env.RunCommand, giving any embedded template expression in a directory name full OS command execution capability. The flaw affects every path style (full, folder, agnoster, agnoster_short, mixed, letter) and the default configuration contains a path segment, meaning no non-default setup is required.
Know when Oh My Posh gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Local vector because attacker must place a malicious directory on the victim's filesystem; PR:N as no elevated privileges needed to create directories; UI:R because victim must navigate into the directory to trigger prompt rendering.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Executive ViewAI
Oh My Posh prior to version 29.35.1 contains a template injection vulnerability allowing arbitrary system command execution (publicly available exploit code exists) as the victim user. This affects developers and engineers accessing maliciously named directories on shared or attacker-influenced filesystems. With no patch currently available, organizations must immediately assess exposure and implement interim security controls.
No vendor-released patch identified at time of analysis. Interim mitigations include: restrict write access to shared directories where developers work; educate users to avoid cloning or entering repositories from untrusted sources; disable path segment rendering in Oh My Posh configuration if operationally feasible; implement OS-level access controls (AppArmor, SELinux) to limit shell execution scope; monitor shell command execution logs for anomalous activity in development environments.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
More in Oh My Posh
View allSame weakness CWE-94 – Code Injection
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
EUVD-2026-58078
GHSA-6xj8-qv9j-xcjq
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB