6.5Medium

CVE-2025-47906Unexpected paths returned from LookPath in os/exec

Go standard library os/exec Published: (1 year ago)

Description

If the PATH environment variable contains paths which are executables (rather than just directories), passing certain strings to LookPath ("", ".", and ".."), can result in the binaries listed in the PATH being unexpectedly returned.

Weakness (CWE): CWE-115

Data: CVE.org, NVD, CISA KEV, FIRST EPSS, Ubuntu. Published as the sources state it, in English.

Affected products and versions

VendorProductVersions
Go standard library os/exec < 1.23.12, 1.24.0 – < 1.24.6
golang go < 1.23.12

References and patches

CPE matches (NVD) (2)

  • cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* < 1.23.12
  • cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* ≥ 1.24.0 < 1.24.6