Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-47906: CWE-115: Misinterpretation of Input in Go standard library os/exec

0
Medium
VulnerabilityCVE-2025-47906cvecve-2025-47906cwe-115
Published: Thu Sep 18 2025 (09/18/2025, 18:41:11 UTC)
Source: CVE Database V5
Vendor/Project: Go standard library
Product: 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

AILast updated: 11/04/2025, 21:51:02 UTC

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.

Need more detailed analysis?Get Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats