CVE-2026-42501
Undergoing Analysis Undergoing Analysis - In Progress
Go Toolchain Validation Bypass via Malicious Module Proxy

Publication date: 2026-05-07

Last updated on: 2026-05-08

Assigner: Go Project

Description
A malicious module proxy can exploit a flaw in the go command's validation of module checksums to bypass checksum database validation. This vulnerability affects any user using an untrusted module proxy (GOMODPROXY) or checksum database (GOSUMDB). A malicious module proxy can serve altered versions of the Go toolchain. When selecting a different version of the Go toolchain than the currently installed toolchain (due to the GOTOOLCHAIN environment variable, or a go.work or go.mod with a toolchain line), the go command will download and execute a toolchain provided by the module proxy. A malicious module proxy can bypass checksum database validation for this downloaded toolchain. Since this vulnerability affects the security of toolchain downloads, setting GOTOOLCHAIN to a fixed version is not sufficient. You must upgrade your base Go toolchain. The go tool always validates the hash of a toolchain before executing it, so fixed versions will refuse to execute any cached, altered versions of the toolchain. The go tool trusts go.sum files to contain accurate hashes of the current module's dependencies. A malicious proxy exploiting this vulnerability to serve an altered module will have caused an incorrect hash to be recorded in the go.sum. Users who have configured a non-trusted GOPROXY can determine if they have been affected by running "rm go.sum ; go mod tidy ; go mod verify", which will revalidate all dependencies of the current module. The specific flaw in more detail: The go command consults the checksum database to validate downloaded modules, when a module is not listed in the go.sum file. It verifies that the module hash reported by the checksum database matches the hash of the downloaded module. If, however, the checksum database returns a successful response that contains no entry for the module, the go command incorrectly permitted validation to succeed. A module proxy may mirror or proxy the checksum database, in which case the go command will not connect to the checksum database directly. Checksums reported by the checksum database are cryptographically signed, so a malicious proxy cannot alter the reported checksum for a module. However, a proxy which returns an empty checksum response, or a checksum response for an unrelated module, could cause the go command to proceed as if a downloaded module has been validated.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-05-07
Last Modified
2026-05-08
Generated
2026-05-09
AI Q&A
2026-05-07
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
golang go From 1.26.0 (inc) to 1.26.3 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-347 The product does not verify, or incorrectly verifies, the cryptographic signature for data.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability (CVE-2026-42501) affects the Go toolchain's command (`cmd/go`) and involves a flaw in how the go command validates module checksums when downloading modules or toolchains from a module proxy or checksum database.

A malicious module proxy can exploit this flaw to bypass checksum database validation by returning a successful response that contains no entry for the module, or an unrelated module entry, causing the go command to incorrectly accept the module as valid.

This allows the proxy to serve altered versions of the Go toolchain or modules, potentially compromising the integrity of the downloaded code.

Users relying on untrusted module proxies (GOMODPROXY) or checksum databases (GOSUMDB) are vulnerable, and simply setting the GOTOOLCHAIN environment variable to a fixed version is not sufficient to mitigate the risk.

To detect if a module has been altered, users can run the commands "rm go.sum ; go mod tidy ; go mod verify" to revalidate all dependencies.


How can this vulnerability impact me? :

This vulnerability can impact you by allowing a malicious module proxy to serve altered or tampered versions of the Go toolchain or modules without proper checksum validation.

If exploited, it could lead to execution of compromised code during the build or execution process, potentially introducing security risks such as unauthorized code execution, data corruption, or other malicious behavior.

Because the go command trusts the go.sum file for module hashes, a malicious proxy could cause incorrect hashes to be recorded, further compromising the integrity of your dependencies.

Even users who set the GOTOOLCHAIN environment variable to a fixed version remain at risk unless they upgrade their base Go toolchain to a fixed version that rejects altered cached toolchains.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

Users who have configured a non-trusted GOPROXY can determine if they have been affected by revalidating all dependencies of the current module.

To check for potential exploitation, run the following commands:

  • rm go.sum
  • go mod tidy
  • go mod verify

What immediate steps should I take to mitigate this vulnerability?

The primary mitigation step is to upgrade your base Go toolchain to a fixed version that properly verifies checksum database responses.

Setting the GOTOOLCHAIN environment variable to a fixed version is not sufficient by itself.

The fixed versions of the Go tool will refuse to execute any cached, altered versions of the toolchain, ensuring security.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart