CVE-2025-68119: Unexpected code execution when invoking toolchain in cmd/go

Published Jan 28, 2026
·
Updated

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

40 affected componentsFixes available
npm/mercurial
npm/git
Golang Go<1.24.12
Golang Go>=1.25.0<1.25.6
go/toolchain<1.24.13
1.24.13
go/toolchain>=1.25.0<1.25.6
1.25.6
debian/golang-1.19<=1.19.8-2
debian/golang-1.24<=1.24.4-1
1.24.13-1
debian/golang-1.25
1.25.6-1
ubuntu/golang-1.10*
ubuntu/golang-1.10*
ubuntu/golang-1.6*
ubuntu/golang-1.13*
ubuntu/golang-1.18*
ubuntu/golang-1.10*
ubuntu/golang-1.13*
ubuntu/golang-1.16*
ubuntu/golang-1.18*
ubuntu/golang-1.8*
ubuntu/golang-1.13*
ubuntu/golang-1.16*
ubuntu/golang-1.18*
ubuntu/golang-1.22*
ubuntu/golang-1.17*
ubuntu/golang-1.22*
ubuntu/golang-1.24*
ubuntu/golang-1.13*
ubuntu/golang-1.21*
ubuntu/golang-1.22*
ubuntu/golang-1.24*
ubuntu/golang-1.23*
ubuntu/golang-1.24*
ubuntu/golang-1.23*
ubuntu/golang-1.24*
debian/golang-1.19*
debian/golang-1.24*
alpine/go<1.24.12-r0
1.24.12-r0
alpine/go>=1.25.0<1.25.6-r0
1.25.6-r0
alpine/go>=1.25.0<1.25.6-r0
1.25.6-r0
alpine/go>=1.25.0<1.25.6-r0
1.25.6-r0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade alpine/go to a version that resolves this vulnerability.

    Fixed in 1.24.12-r0
  2. Upgrade

    Upgrade alpine/go to a version that resolves this vulnerability.

    Fixed in 1.25.6-r0
  3. Upgrade

    Upgrade go/toolchain to a version that resolves this vulnerability.

    Fixed in 1.24.13
  4. Upgrade

    Upgrade go/toolchain to a version that resolves this vulnerability.

    Fixed in 1.25.6
  5. Upgrade

    Upgrade debian/golang-1.24 to a version that resolves this vulnerability.

    Fixed in 1.24.13-1
  6. Upgrade

    Upgrade debian/golang-1.25 to a version that resolves this vulnerability.

    Fixed in 1.25.6-1

Event History

Jan 28, 2026
Advisory Published
via OSV·07:07 PM
Data Sourced
via OSV·07:07 PM
DescriptionAffected Software
CVE Published
via MITRE·07:30 PM
Data Sourced
via MITRE·07:30 PM
DescriptionWeakness
Data Sourced
via OSV·07:30 PM
Severity
Data Sourced
via Red Hat·08:02 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·08:16 PM
Description
Jan 29, 2026
Data Sourced
via NVD·05:16 PM
Severity
Feb 6, 2026
Data Sourced
via NVD·06:40 PM
RemedyWeaknessAffected Software
Sep 3, 2026
Data Sourced
via Microsoft·08:14 AM
DescriptionSeverityWeakness
Nov 17, 2026
Updated
via OSV·06:31 AM
Affected Software
Dec 3, 2026
Updated
via OSV·11:33 PM
Affected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-68119?

CVE-2025-68119 is considered a critical vulnerability due to its potential for local code execution.

2

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.

3

What software is affected by CVE-2025-68119?

CVE-2025-68119 affects systems using the Go toolchain, specifically those with Mercurial or Git installed.

4

What type of attack does CVE-2025-68119 enable?

CVE-2025-68119 enables unexpected code execution through malicious version strings during module downloads.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203