CVE-2025-47906: CWE-115: Misinterpretation of Input in Go standard library 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.
AI Analysis
Technical Summary
CVE-2025-47906 is a vulnerability identified in the Go programming language's standard library, specifically within the os/exec package's LookPath function. LookPath is designed to locate an executable binary in the directories listed in the PATH environment variable. The issue arises when the PATH variable contains entries that are executable files themselves rather than directories, which is an uncommon but possible misconfiguration. When certain inputs such as an empty string (""), a single dot ("."), or double dots ("..") are passed to LookPath, the function can mistakenly return binaries listed directly in the PATH instead of searching directories as intended. This behavior is classified under CWE-115, indicating a misinterpretation of input leading to unexpected behavior. The vulnerability affects all Go versions from the initial release up to version 1.24.0. Exploitation does not require any privileges or user interaction, and the attack vector is network-based, meaning remote exploitation is possible if the vulnerable function is exposed. The impact includes potential confidentiality loss if unintended binaries are executed and availability issues if malicious or unintended binaries disrupt normal operations. No patches or fixes are currently linked, and no exploits have been observed in the wild. However, the vulnerability poses a risk in environments where PATH variables might be manipulated or improperly set, such as automated build systems, containerized environments, or CI/CD pipelines using Go tooling.
Potential Impact
For European organizations, the vulnerability could lead to unintended execution of binaries, which may cause data leakage or service disruption. This is particularly concerning for organizations relying heavily on Go for critical infrastructure, cloud services, or software development. Misconfigured PATH variables in development or production environments could be exploited to execute malicious code or disrupt services, impacting confidentiality and availability. The medium CVSS score (6.5) reflects moderate risk, but the lack of required privileges or user interaction increases the likelihood of exploitation in automated or unattended systems. Organizations in sectors such as finance, telecommunications, and government services, where Go is used extensively, may face operational risks if this vulnerability is exploited. Additionally, supply chain attacks targeting Go-based build environments could leverage this flaw to introduce malicious binaries. Overall, the impact is moderate but could escalate if combined with other vulnerabilities or misconfigurations.
Mitigation Recommendations
European organizations should immediately audit their PATH environment variables to ensure they contain only directories and not executable files. Developers and system administrators should update Go to versions beyond 1.24.0 once patches are released. Until patches are available, avoid passing empty strings or dot-related inputs to LookPath in custom code. Implement strict environment sanitation in CI/CD pipelines and container environments to prevent PATH pollution. Use container security best practices to limit executable paths and employ runtime monitoring to detect unexpected binary executions. Additionally, conduct code reviews focusing on the use of os/exec and LookPath to identify and remediate unsafe usage patterns. Employ application whitelisting and integrity monitoring to detect unauthorized binaries. Finally, maintain awareness of updates from the Go project regarding patches or workarounds.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Ireland, Poland
CVE-2025-47906: CWE-115: Misinterpretation of Input in Go standard library os/exec
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.
AI-Powered Analysis
Technical Analysis
CVE-2025-47906 is a vulnerability identified in the Go programming language's standard library, specifically within the os/exec package's LookPath function. LookPath is designed to locate an executable binary in the directories listed in the PATH environment variable. The issue arises when the PATH variable contains entries that are executable files themselves rather than directories, which is an uncommon but possible misconfiguration. When certain inputs such as an empty string (""), a single dot ("."), or double dots ("..") are passed to LookPath, the function can mistakenly return binaries listed directly in the PATH instead of searching directories as intended. This behavior is classified under CWE-115, indicating a misinterpretation of input leading to unexpected behavior. The vulnerability affects all Go versions from the initial release up to version 1.24.0. Exploitation does not require any privileges or user interaction, and the attack vector is network-based, meaning remote exploitation is possible if the vulnerable function is exposed. The impact includes potential confidentiality loss if unintended binaries are executed and availability issues if malicious or unintended binaries disrupt normal operations. No patches or fixes are currently linked, and no exploits have been observed in the wild. However, the vulnerability poses a risk in environments where PATH variables might be manipulated or improperly set, such as automated build systems, containerized environments, or CI/CD pipelines using Go tooling.
Potential Impact
For European organizations, the vulnerability could lead to unintended execution of binaries, which may cause data leakage or service disruption. This is particularly concerning for organizations relying heavily on Go for critical infrastructure, cloud services, or software development. Misconfigured PATH variables in development or production environments could be exploited to execute malicious code or disrupt services, impacting confidentiality and availability. The medium CVSS score (6.5) reflects moderate risk, but the lack of required privileges or user interaction increases the likelihood of exploitation in automated or unattended systems. Organizations in sectors such as finance, telecommunications, and government services, where Go is used extensively, may face operational risks if this vulnerability is exploited. Additionally, supply chain attacks targeting Go-based build environments could leverage this flaw to introduce malicious binaries. Overall, the impact is moderate but could escalate if combined with other vulnerabilities or misconfigurations.
Mitigation Recommendations
European organizations should immediately audit their PATH environment variables to ensure they contain only directories and not executable files. Developers and system administrators should update Go to versions beyond 1.24.0 once patches are released. Until patches are available, avoid passing empty strings or dot-related inputs to LookPath in custom code. Implement strict environment sanitation in CI/CD pipelines and container environments to prevent PATH pollution. Use container security best practices to limit executable paths and employ runtime monitoring to detect unexpected binary executions. Additionally, conduct code reviews focusing on the use of os/exec and LookPath to identify and remediate unsafe usage patterns. Employ application whitelisting and integrity monitoring to detect unauthorized binaries. Finally, maintain awareness of updates from the Go project regarding patches or workarounds.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Go
- Date Reserved
- 2025-05-13T23:31:29.596Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 68cc6f9bc42e09d33b9ea2c7
Added to database: 9/18/2025, 8:46:19 PM
Last enriched: 11/4/2025, 9:51:02 PM
Last updated: 12/17/2025, 3:43:29 AM
Views: 117
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-14303: CWE-693 Protection Mechanism Failure in MSI Intel 600 chipset motherboard
HighCVE-2025-14302: CWE-693 Protection Mechanism Failure in GIGABYTE intel 600 chipset Motherboard
HighCVE-2025-14801: Cross Site Scripting in xiweicheng TMS
MediumCVE-2025-11369: CWE-862 Missing Authorization in wpdevteam Gutenberg Essential Blocks – Page Builder for Gutenberg Blocks & Patterns
MediumRogue NuGet Package Poses as Tracer.Fody, Steals Cryptocurrency Wallet Data
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.