CVE Database›Document archive›CVE-2025-68119

CVE-2025-68119

cmd/go: cmd/go: Local code execution and arbitrary file write via malicious module version strings

Loading…

Severity

Moderate

Red Hat Product Security

6.7

CVSS 3.1

Review impact separately from score.

Published · January 29, 2026

Updated · June 28, 2026

Description

A flaw was found in Golang's cmd/go module. This vulnerability allows a local attacker to achieve local code execution by downloading and building modules with specially crafted malicious version strings. On systems with Mercurial (hg) installed, this can occur when downloading modules from non-standard sources due to how external Version Control System (VCS) commands are constructed. Additionally, on systems with Git installed, providing malicious version strings to the toolchain can enable an attacker to write to arbitrary files on the filesystem. This issue is triggered by explicitly supplying these malicious version strings.

Statement

This issue is rated Moderate severity by Red Hat Product Security, because exploitation requires non-standard and intentional user behavior.

The attacker must explicitly supply a specially crafted module version string, which does not occur during normal Go module usage such as @latest or standard module paths, making the attack complexity high.

Additionally, user interaction is required, as the vulnerable behavior is only triggered when a user manually invokes the Go toolchain to download or build the malicious module.

While successful exploitation can result in local code execution or arbitrary file modification, the combination of local access, manual input, and uncommon usage patterns significantly limits the likelihood of exploitation in typical environments.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is currently available that meets Red Hat Product Security's standards for usability, deployment, applicability, or stability.

CVSS / CWE

CVSS 3.1 · 6.7
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H

CWE-78 · Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')