CVE-2025-68119: Unexpected code execution when invoking toolchain in cmd/go
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.
Other sources
Unexpected code execution when invoking toolchain in cmd/go
— Microsoft
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-68119?
CVE-2025-68119 is considered a critical vulnerability due to its potential for local code execution.
How do I fix CVE-2025-68119?
To fix CVE-2025-68119, ensure to only download modules from trusted sources and avoid using custom domains for module retrieval.
What software is affected by CVE-2025-68119?
CVE-2025-68119 affects systems using the Go toolchain, specifically those with Mercurial or Git installed.
What type of attack does CVE-2025-68119 enable?
CVE-2025-68119 enables unexpected code execution through malicious version strings during module downloads.
Is there a workaround for CVE-2025-68119?
A temporary workaround for CVE-2025-68119 is to disable module downloading until a patch is applied.