Skip to content
OpenAdvisories
High · 7.8 CVE-2026-73505 EUVD-2026-58078GHSA-6xj8-qv9j-xcjqGO-2026-6108

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

Published Aug 13, 2026 · Updated Aug 13, 2026 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
JanDeDobbeleer oh-my-posh < 29.35.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
SLES for SAP 16.0 govulncheck-vulndb 0.0.20260827T195228-160000.1.1 SUSE-SU-2026:23625-1
SLES 16.0 govulncheck-vulndb 0.0.20260827T195228-160000.1.1 SUSE-SU-2026:23625-1
ReleasePackageFixed inAdvisory
openSUSE Leap 16.0 govulncheck-vulndb 0.0.20260827T195228-160000.1.1 openSUSE-SU-2026:21761-1

Affected packages

EcosystemPackageAffectedFixedRecord
Go github.com/jandedobbeleer/oh-my-posh < 29.35.1 29.35.1 GHSA-6xj8-qv9j-xcjq
Go github.com/jandedobbeleer/oh-my-posh < 29.35.1+incompatible 29.35.1+incompatible GO-2026-6108

Advisories 2

References