CVE-2025-4674

Unexpected command execution in untrusted VCS repositories in cmd/go

Published Jul 29, 2025 CVSS 3.1 · 8.6 High EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2025-23047 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.
History
Type Values Removed Values Added
First Time appeared Golang
Golang go
CPEs cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
Vendors & Products Golang
Golang go
Type Values Removed Values Added
Weaknesses CWE-73
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Weaknesses CWE-74
References
Metrics threat_severity

None

cvssV3_1

{'score': 8.6, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H'}

threat_severity

Important

Type Values Removed Values Added
First Time appeared Gotoolchain
Gotoolchain cmd/go
Vendors & Products Gotoolchain
Gotoolchain cmd/go
Type Values Removed Values Added
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.
Title Unexpected command execution in untrusted VCS repositories in cmd/go
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Go
Published
Updated
Nov 4, 2025, 9:10 PM
Reserved
May 13, 2025, 11:31 PM
Status
Analyzed
Published
Jul 29, 2025, 10:15 PM
Modified
Jun 17, 2026, 9:33 AM
Severity
Important
Public date
Jul 29, 2025, 9:19 PM