Go Command Toolchain Vulnerability Allowing Local Code Execution

Vulnerability

A vulnerability in the Go command toolchain can lead to local code execution by downloading and building modules with malicious version strings. On systems with Mercurial installed, modules from non-standard sources can execute unexpected code due to the construction of external version control system commands. Similarly, on systems with Git, malicious version strings can be used to write arbitrary files on the filesystem. This vulnerability requires explicit action by the user and does not affect default module paths or the latest version.

Impact

Exploitation of this vulnerability can result in arbitrary code execution on the affected system.

Reproduction

The vulnerability can be reproduced by downloading and building Go modules that contain malicious version strings, specifically when using Git or Mercurial as the version control system. This can be done by manually specifying the malicious versions in the module download commands.

Remediation

Users can update to Go versions 1.25.6 or 1.24.12, both of which include the necessary fix. Instructions for downloading these versions are available on the Go website.

Added: Jan 28, 2026, 8:30 PM
Updated: Jan 28, 2026, 8:30 PM

Vulnerability Rating

Custom Algorithm
spread
5.4
impact
2.5
exploitability
4.8
remediation
7.7
relevance
2.4
threat
4.8
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.