Unexpected paths returned from LookPath in os/exec
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.
02 / AFFECTED SOFTWARE
Affected packages
156 explicit affected versions
03 / CONNECTIONS
Connected vulnerabilities
04 / EVIDENCE
Source records
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.
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.
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.
05 / REFERENCES
Further evidence
- http://www.openwall.com/lists/oss-security/2025/08/06/1
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/47xxx/CVE-2025-47906.json
- https://go.dev/cl/691775
- https://go.dev/issue/74466
- https://groups.google.com/g/golang-announce/c/x5MKroML2yM
- https://nvd.nist.gov/vuln/detail/CVE-2025-47906
- https://pkg.go.dev
- https://pkg.go.dev/vuln/GO-2025-3956