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-68119: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in Go toolchain cmd/go

0
High
VulnerabilityCVE-2025-68119cvecve-2025-68119cwe-78
Published: Wed Jan 28 2026 (01/28/2026, 19:30:30 UTC)
Source: CVE Database V5
Vendor/Project: Go toolchain
Product: cmd/go

Description

Downloading and building modules with malicious version strings can cause local code execution. On systems with Mercurial (hg) installed, downloading modules from non-standard sources (e.g., custom domains) can cause unexpected code execution due to how external VCS commands are constructed. This issue can also be triggered by providing a malicious version string to the toolchain. On systems with Git installed, downloading and building modules with malicious version strings can allow an attacker to write to arbitrary files on the filesystem. This can only be triggered by explicitly providing the malicious version strings to the toolchain and does not affect usage of @latest or bare module paths.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 02/27/2026, 07:37:54 UTC

Technical Analysis

CVE-2025-68119 is an OS command injection vulnerability (CWE-78) affecting the Go programming language toolchain, specifically the cmd/go module downloader in version 1.25.0. The vulnerability occurs because the toolchain improperly neutralizes special characters in version strings when constructing commands to invoke external version control systems (VCS) like Mercurial (hg) and Git. On systems with Mercurial installed, downloading modules from non-standard sources (such as custom domains) with maliciously crafted version strings can cause the toolchain to execute unintended OS commands, leading to local code execution. This happens due to unsafe concatenation or interpolation of version strings into shell commands without proper sanitization. On systems with Git installed, the vulnerability manifests as the ability to write arbitrary files to the filesystem by exploiting the handling of malicious version strings. However, this attack vector requires the attacker to explicitly supply the malicious version strings to the toolchain; normal module fetching using default or latest versions is not affected. The vulnerability requires local or low-privileged user access and does not require user interaction once the malicious version string is provided. The CVSS v3.1 score of 7.0 (AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H) indicates a high severity with local attack vector, high attack complexity, low privileges required, no user interaction, and high impact on confidentiality, integrity, and availability. No public exploits have been reported yet, and no patches are linked in the provided data, indicating that remediation may still be pending or in progress.

Potential Impact

This vulnerability poses a significant risk to developers and organizations using the Go toolchain version 1.25.0, especially those who build modules from non-standard or custom sources. Successful exploitation can lead to local code execution or arbitrary file writes, potentially allowing attackers to escalate privileges, implant persistent backdoors, or tamper with source code and build artifacts. The impact extends to the integrity and confidentiality of the development environment and the availability of build processes. Since the vulnerability requires explicit malicious version strings, supply chain attacks or social engineering to trick developers into using crafted versions could be a realistic threat vector. Organizations relying on automated build pipelines or CI/CD systems that fetch Go modules from custom repositories are particularly at risk. The absence of user interaction lowers the barrier for exploitation once the malicious version string is introduced. Although no known exploits are currently reported, the potential for damage in software supply chains and development environments is high, warranting urgent attention.

Mitigation Recommendations

1. Avoid using non-standard or custom module sources unless absolutely necessary and ensure they are from trusted origins. 2. Do not explicitly specify version strings in module downloads unless verified and sanitized. 3. Upgrade the Go toolchain to a patched version once available; monitor official Go project advisories for updates. 4. Implement strict input validation and sanitization for version strings in internal tooling or scripts that invoke cmd/go. 5. Restrict or remove Mercurial and Git from build environments where not required to reduce attack surface. 6. Use containerized or isolated build environments to limit the impact of potential local code execution. 7. Monitor build logs and filesystem changes for unexpected behavior during module downloads. 8. Educate developers about the risks of using untrusted module versions and enforce policies for module provenance verification. 9. Employ runtime security tools to detect anomalous command executions or file writes during builds. 10. Consider using reproducible builds and cryptographic verification of module sources to prevent tampering.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
Go
Date Reserved
2025-12-15T16:48:04.450Z
Cvss Version
null
State
PUBLISHED

Threat ID: 697a653b4623b1157cea4eec

Added to database: 1/28/2026, 7:36:27 PM

Last enriched: 2/27/2026, 7:37:54 AM

Last updated: 3/26/2026, 6:39:49 AM

Views: 52

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 more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses