Go Vulnerability Database
GO-2025-3956
Unexpected paths returned from LookPath in os/exec
Details
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.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Go | stdlib | All versions before 1.23.12 (fixed in 1.23.12) From 1.24.0 before 1.24.6 (fixed in 1.24.6) |