Skip to content

← Actionable
High, CVSS 7.8amended

Oh My Posh: Arbitrary command execution via template injection in the path segment

CVE-2026-73505GHSA-6xj8-qv9j-xcjq

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (github.com/jandedobbeleer/oh-my-posh 29.35.1), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
7.8 · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
  • CVE-2026-73505: 0.21% estimated exploitation activity in the next 30 days; percentile 11.56 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary Oh My Posh re-renders the resolved path string, which contains the raw folder names taken from the filesystem, through the Go text/template engine. That engine's function map exposes a cmd function that runs arbitrary OS commands. A directory whose name contains a Go template expression is therefore evaluated when the prompt renders, giving arbitrary command execution as the current user as soon as the shell is inside (or below) that directory. The built-in default configuration is affected. Details src/segments/path.go, setStyle(): pt.Path is built from the raw folder-name components of the current working directory (colorizePath inserts each folder name verbatim via fmt.Sprintf(folderFormat, element)). The whole string is then passed to template.Render, which parses and executes it with the full function map from src/template/funcmap.go, including: Any template syntax present in an untrusted folder name is evaluated. The render runs after the path-style switch…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from ghsa record GHSA-6xj8-qv9j-xcjq

  2. Revision 1 · created ·

    Published from osv record GO-2026-6108

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-73505

Advisory: Oh My Posh: Arbitrary command execution via template injection in the path segment
IDs: CVE-2026-73505, GHSA-6xj8-qv9j-xcjq
Record: https://patchnext.com/advisories/cve-2026-73505 (revision 2, source checked 26 Oct 2026, 15:28 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 7.8)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: github.com/jandedobbeleer/oh-my-posh 29.35.1. A vendor fix does not mean a deployment is fixed.

## Affected components
- Go github.com/jandedobbeleer/oh-my-posh: affected <= 29.35.0; fixed in 29.35.1

## Suggested inspection (read-only)
- Go github.com/jandedobbeleer/oh-my-posh: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on github.com/jandedobbeleer/oh-my-posh.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GO-2026-6108 (OSV record GO-2026-6108 lists affected ranges: Go github.com/jandedobbeleer/oh-my-posh >=0 <29.35.1+incompatible (fixed))
- Verified: https://github.com/advisories/GHSA-6xj8-qv9j-xcjq (GitHub-reviewed advisory GHSA-6xj8-qv9j-xcjq lists affected ranges: Go github.com/jandedobbeleer/oh-my-posh >=0 <=29.35.0)

Commands are suggestions: review each one before running it.

Loading voting…