CVE-2025-68119 Unexpected code execution when invoking toolchain in cmd/go
Attackers can achieve local code execution or arbitrary file writes by providing malicious version strings to the Go toolchain during module downloads.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-68119?
CVE-2025-68119 is a high-severity command injection vulnerability in Golang Go, published on 28 Jan 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Weakness: CWE-787
Which versions are affected by CVE-2025-68119?
2 open source packages ship an affected version, including golang and toolchain. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
golang Bitnami | From 1.25.0 | 1.25.6 |
toolchain Go | From 1.25.0 | 1.25.6 |
Products include Golang Go.
How do I fix CVE-2025-68119?
Upgrade golang to 1.25.6 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2025-68119 being exploited?
There is no known exploitation of CVE-2025-68119 in the wild and no public exploit code.
Other vulnerabilities in Golang Go
- CVE-2020-0601 Microsoft Windows CryptoAPI Spoofing
- CVE-2026-27143 Missing bound checks can lead to memory corruption in safe Go in cmd/compile
- CVE-2024-24790 Unexpected behavior from Is methods for IPv4-mapped IPv6 addresses in net/netip
- CVE-2023-39320 Arbitrary code execution via go.mod toolchain directive in cmd/go
- CVE-2023-24540 Improper handling of JavaScript whitespace in html/template
Sources
Also known as AZL-75639, AZL-75698, AZL-75728, AZL-78939, AZL-98691, BELL-CVE-2025-68119 and 394 more.