Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
High

Unexpected code execution and arbitrary file write in Go cmd/go VCS handling

IdentifiersCVE-2025-68119CWE-78

CVE-2025-68119 affects the Go toolchain's cmd/go VCS integration when resolving or building modules. According to the provided content, on systems with Mercurial (hg) installed, downloading modules from non-standard sources such as custom domains can trigger unexpected local code execution because of how external VCS commands are constructed. The issue can also be triggered by supplying a malicious module version string directly to the toolchain. On systems with Git installed, malicious version strings can cause the toolchain to write to arbitrary filesystem paths during module download/build operations. The issue is specifically associated with untrusted handling of VCS-related inputs in cmd/go, and the fix reportedly included safer VCS options and rejection of module version strings prefixed with '-' or '/'. The content states that this does not affect normal use of @latest or bare module paths.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can yield local code execution in the context of the user or automation account running the Go toolchain on systems with Mercurial installed. On systems with Git installed, exploitation can provide arbitrary file write capability, which may enable overwrite of build artifacts, configuration files, hooks, or other attacker-chosen paths accessible to that account. In CI/CD or developer workstations, this creates a supply-chain risk that can lead to further code execution, persistence, credential exposure, or tampering with produced binaries and source trees.

Mitigation

If you can’t patch tonight, do this now.

Until patched versions are deployed, avoid fetching modules from non-standard or custom domains unless fully trusted, and do not pass untrusted, user-controlled, or externally sourced module version strings to go tooling. Prefer standard module resolution patterns such as @latest or bare module paths where possible. In build pipelines, strictly validate or allowlist module paths and versions, disable or restrict outbound dependency fetching from untrusted sources, and minimize availability of external VCS tools such as hg or git where not required.

Remediation

Patch, then assume compromise.

Upgrade to a fixed Go release that includes the cmd/go VCS handling fix, specifically Go 1.25.6 or Go 1.24.12 as referenced in the provided content. The fix reportedly hardens VCS invocation by using safer options and disallowing module version strings beginning with '-' or '/'. Rebuild affected binaries and ensure build environments, CI runners, and developer systems use the patched toolchain.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Go ProjectGo Toolchain (Module Download/Build)application
GolangGoapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity13

Community discussion across Reddit, Mastodon, and other social sources.