CVEfocus › CVE database › CVE-2025-4674

CVE-2025-4674Unexpected command execution in untrusted VCS repositories in cmd/go

CVSS 8.6 HighEPSS 0.3% (higher than 18% of CVEs)Published 2025-07-29Updated 2025-11-04Assigner: Go

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.

CWE-73

What to do

Fixed builds are available from AlmaLinux, Alpine, Go, Red Hat, Rocky Linux: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

53Fixed
17Fix pending
2Will not fix
8Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04golang-1.23Fix pendingUBUNTU-CVE-2025-4674
Ubuntu 26.04golang-1.24Not affected
vulnerable_code_not_present
Ubuntu 26.04golang-1.25Not affected
vulnerable_code_not_present
Ubuntu 25.10golang-1.23Will not fix
Packages built using golang need to be rebuilt once the vulnerability has been fixed. This CVE entry does not list packages that need rebuilding outside of…
UBUNTU-CVE-2025-4674
Ubuntu 25.10golang-1.24Will not fix
Packages built using golang need to be rebuilt once the vulnerability has been fixed. This CVE entry does not list packages that need rebuilding outside of…
UBUNTU-CVE-2025-4674
Ubuntu 25.10golang-1.25Not affected
vulnerable_code_not_present
Ubuntu 24.04golang-1.21Fix pendingUBUNTU-CVE-2025-4674
Ubuntu 24.04golang-1.22Fix pendingUBUNTU-CVE-2025-4674
Ubuntu 24.04golang-1.23Fix pendingUBUNTU-CVE-2025-4674
Ubuntu 24.04golang-1.24Not affected
vulnerable_code_not_present
Ubuntu 24.04golang-1.25Not affected
vulnerable_code_not_present
Ubuntu 22.04golang-1.17Not affected
vulnerable_code_not_present
Ubuntu 22.04golang-1.18Fix pendingUBUNTU-CVE-2025-4674
Ubuntu 22.04golang-1.20Fix pendingUBUNTU-CVE-2025-4674
Ubuntu 22.04golang-1.21Fix pendingUBUNTU-CVE-2025-4674
Ubuntu 22.04golang-1.22Fix pendingUBUNTU-CVE-2025-4674
Ubuntu 22.04golang-1.23Fix pendingUBUNTU-CVE-2025-4674
Ubuntu 22.04golang-1.24Not affected
vulnerable_code_not_present
Ubuntu 22.04golang-1.25Not affected
vulnerable_code_not_present
Ubuntu 20.04golang-1.18Fix pendingUBUNTU-CVE-2025-4674
Ubuntu 20.04golang-1.20Fix pendingUBUNTU-CVE-2025-4674
Ubuntu 20.04golang-1.21Fix pendingUBUNTU-CVE-2025-4674
Ubuntu 20.04golang-1.22Fix pendingUBUNTU-CVE-2025-4674
Ubuntu 18.04golang-1.18Fix pendingUBUNTU-CVE-2025-4674
Ubuntu 16.04golang-1.18Fix pendingUBUNTU-CVE-2025-4674
Debian 13golang-1.24Fix pendingDEBIAN-CVE-2025-4674
Debian 12golang-1.19Fix pendingDEBIAN-CVE-2025-4674
Red Hat Enterprise Linux 10go-toolsetFixed0:1.24.6-1.el10_0RHSA-2025:13941
Red Hat Enterprise Linux 10golangFixed0:1.24.6-1.el10_0RHSA-2025:13941
Red Hat Enterprise Linux 10golang-binFixed0:1.24.6-1.el10_0RHSA-2025:13941
Red Hat Enterprise Linux 10golang-docsFixed0:1.24.6-1.el10_0RHSA-2025:13941
Red Hat Enterprise Linux 10golang-miscFixed0:1.24.6-1.el10_0RHSA-2025:13941
Red Hat Enterprise Linux 10golang-raceFixed0:1.24.6-1.el10_0RHSA-2025:13941
Red Hat Enterprise Linux 10golang-srcFixed0:1.24.6-1.el10_0RHSA-2025:13941
Red Hat Enterprise Linux 10golang-testsFixed0:1.24.6-1.el10_0RHSA-2025:13941
Red Hat Enterprise Linux 9go-toolsetFixed0:1.24.6-1.el9_6RHSA-2025:13935
Red Hat Enterprise Linux 9golangFixed0:1.24.6-1.el9_6RHSA-2025:13935
Red Hat Enterprise Linux 9golang-binFixed0:1.24.6-1.el9_6RHSA-2025:13935
Red Hat Enterprise Linux 9golang-docsFixed0:1.24.6-1.el9_6RHSA-2025:13935
Red Hat Enterprise Linux 9golang-miscFixed0:1.24.6-1.el9_6RHSA-2025:13935
Red Hat Enterprise Linux 9golang-raceFixed0:1.24.6-1.el9_6RHSA-2025:13935
Red Hat Enterprise Linux 9golang-srcFixed0:1.24.6-1.el9_6RHSA-2025:13935
Red Hat Enterprise Linux 9golang-testsFixed0:1.24.6-1.el9_6RHSA-2025:13935
Red Hat Enterprise Linux 8delveFixed0:1.24.1-1.module+el8.10.0+22945+b2c96a17RHSA-2025:13940
Red Hat Enterprise Linux 8go-toolsetFixed0:1.24.6-1.module+el8.10.0+23407+428597c7RHSA-2025:13940
Red Hat Enterprise Linux 8golangFixed0:1.24.6-1.module+el8.10.0+23407+428597c7RHSA-2025:13940
Red Hat Enterprise Linux 8golang-binFixed0:1.24.6-1.module+el8.10.0+23407+428597c7RHSA-2025:13940
Red Hat Enterprise Linux 8golang-docsFixed0:1.24.6-1.module+el8.10.0+23407+428597c7RHSA-2025:13940
Red Hat Enterprise Linux 8golang-miscFixed0:1.24.6-1.module+el8.10.0+23407+428597c7RHSA-2025:13940
Red Hat Enterprise Linux 8golang-srcFixed0:1.24.6-1.module+el8.10.0+23407+428597c7RHSA-2025:13940
Red Hat Enterprise Linux 8golang-testsFixed0:1.24.6-1.module+el8.10.0+23407+428597c7RHSA-2025:13940
AlmaLinux 10golang-docsFixed1.24.6-1.el10_0.alma.1ALSA-2025:13941
AlmaLinux 10golang-miscFixed1.24.6-1.el10_0.alma.1ALSA-2025:13941
AlmaLinux 10golang-srcFixed1.24.6-1.el10_0.alma.1ALSA-2025:13941
AlmaLinux 10golang-testsFixed1.24.6-1.el10_0.alma.1ALSA-2025:13941
AlmaLinux 9go-toolsetFixed1.24.6-1.el9_6ALSA-2025:13935
AlmaLinux 9golangFixed1.24.6-1.el9_6ALSA-2025:13935
AlmaLinux 9golang-binFixed1.24.6-1.el9_6ALSA-2025:13935
AlmaLinux 9golang-docsFixed1.24.6-1.el9_6ALSA-2025:13935
AlmaLinux 9golang-miscFixed1.24.6-1.el9_6ALSA-2025:13935
AlmaLinux 9golang-raceFixed1.24.6-1.el9_6ALSA-2025:13935
AlmaLinux 9golang-srcFixed1.24.6-1.el9_6ALSA-2025:13935
AlmaLinux 9golang-testsFixed1.24.6-1.el9_6ALSA-2025:13935
AlmaLinux 8delveFixed1.24.1-1.module_el8.10.0+3977+66935a26ALSA-2025:13940
AlmaLinux 8go-toolsetFixed1.24.6-1.module_el8.10.0+4033+4bf8b620ALSA-2025:13940
AlmaLinux 8golangFixed1.24.6-1.module_el8.10.0+4033+4bf8b620ALSA-2025:13940
AlmaLinux 8golang-binFixed1.24.6-1.module_el8.10.0+4033+4bf8b620ALSA-2025:13940
AlmaLinux 8golang-docsFixed1.24.6-1.module_el8.10.0+4033+4bf8b620ALSA-2025:13940
AlmaLinux 8golang-miscFixed1.24.6-1.module_el8.10.0+4033+4bf8b620ALSA-2025:13940
AlmaLinux 8golang-srcFixed1.24.6-1.module_el8.10.0+4033+4bf8b620ALSA-2025:13940
AlmaLinux 8golang-testsFixed1.24.6-1.module_el8.10.0+4033+4bf8b620ALSA-2025:13940
Rocky Linux 10golangFixed0:1.24.6-1.el10_0RLSA-2025:13941
Rocky Linux 9golangFixed0:1.24.6-1.el9_6RLSA-2025:13935
Rocky Linux 8delveFixed0:1.24.1-1.module+el8.10.0+1987+42f155bbRLSA-2025:13940
Rocky Linux 8go-toolsetFixed0:1.24.6-1.module+el8.10.0+2048+bc5b2e29RLSA-2025:13940
Rocky Linux 8golangFixed0:1.24.6-1.module+el8.10.0+2048+bc5b2e29RLSA-2025:13940
Alpine Linux 3.24goFixed1.24.5-r0ALPINE-CVE-2025-4674
Alpine Linux 3.23goFixed1.24.5-r0ALPINE-CVE-2025-4674
Alpine Linux 3.22goFixed1.24.6-r0ALPINE-CVE-2025-4674
Go librarytoolchainFixed1.23.11GO-2025-3828

What the vendor says

As published in the CVE record by Go, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.