CVE-2025-4674: Go toolchain cmd/go · External Control of File Name or Path
Affects Go toolchain cmd/goSource CVE Database V5
Not known to be exploited · CVSS 8.6 High.
Data as of 25 Oct 2026, 19:02 UTC
- EPSS
- 0.4% chance of exploitation in 30 days – higher than 38% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 29 Jul 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Gogithub.com/golang/go/cmd/gopkg:golang/github.com/golang/go/cmd/goOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
1. Immediately restrict usage of untrusted or unknown VCS repositories, especially those fetched from one VCS but containing metadata from another. 2. Implement strict validation and sanitization of VCS metadata before allowing cmd/go operations on repositories. 3. Use isolated and sandboxed environments for building and testing code from untrusted sources to contain potential exploitation. 4. Monitor and audit repository metadata for inconsistencies or suspicious entries indicative of mixed VCS data. 5. Educate developers and DevOps teams about the risks of using mixed or untrusted repositories and the importance of verifying repository provenance. 6. Apply principle of least privilege to build and development environments to limit the impact of potential exploitation. 7. Track Go toolchain updates closely and apply patches as soon as they become available. 8. Consider using alternative methods or tools for fetching and managing dependencies that do not rely on cmd/go when dealing with untrusted repositories. 9. Integrate repository scanning tools into CI/CD pipelines to detect and block suspicious VCS metadata before build steps. 10. Maintain comprehensive backups of build environments and source code to enable rapid recovery in case of compromise.
Description
The go command may execute unexpected commands when operating in untrusted VCS repositories. This occurs when possibly dangerous VCS configuration is present in repositories. This can happen when a repository was fetched via one VCS (e.g. Git), but contains metadata for another VCS (e.g. Mercurial). Modules which are retrieved using the go command line, i.e.via "go get", are not affected.