Vulnerability · Published Jul 29, 2025 · Assigned by Go

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

High 8.6

In plain English

A high-severity security flaw in cmd/go from Go toolchain. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 41% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)8.6High
Exploit odds (30 days)0.5%top 58.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8delve1.24.1-1.module_el8.10.0+3977+66935a26ALSA-2025:13940
AlmaLinux:8go-toolset1.24.6-1.module_el8.10.0+4033+4bf8b620ALSA-2025:13940
AlmaLinux:9go-toolset1.24.6-1.el9_6ALSA-2025:13935
AlmaLinux:8golang1.24.6-1.module_el8.10.0+4033+4bf8b620ALSA-2025:13940
AlmaLinux:9golang1.24.6-1.el9_6ALSA-2025:13935
AlmaLinux:8golang-bin1.24.6-1.module_el8.10.0+4033+4bf8b620ALSA-2025:13940
AlmaLinux:9golang-bin1.24.6-1.el9_6ALSA-2025:13935
AlmaLinux:10golang-docs1.24.6-1.el10_0.alma.1ALSA-2025:13941
AlmaLinux:8golang-docs1.24.6-1.module_el8.10.0+4033+4bf8b620ALSA-2025:13940
AlmaLinux:9golang-docs1.24.6-1.el9_6ALSA-2025:13935
AlmaLinux:10golang-misc1.24.6-1.el10_0.alma.1ALSA-2025:13941
AlmaLinux:8golang-misc1.24.6-1.module_el8.10.0+4033+4bf8b620ALSA-2025:13940
AlmaLinux:9golang-misc1.24.6-1.el9_6ALSA-2025:13935
AlmaLinux:9golang-race1.24.6-1.el9_6ALSA-2025:13935
AlmaLinux:10golang-src1.24.6-1.el10_0.alma.1ALSA-2025:13941
AlmaLinux:8golang-src1.24.6-1.module_el8.10.0+4033+4bf8b620ALSA-2025:13940
AlmaLinux:9golang-src1.24.6-1.el9_6ALSA-2025:13935
AlmaLinux:10golang-tests1.24.6-1.el10_0.alma.1ALSA-2025:13941
AlmaLinux:8golang-tests1.24.6-1.module_el8.10.0+4033+4bf8b620ALSA-2025:13940
AlmaLinux:9golang-tests1.24.6-1.el9_6ALSA-2025:13935
Alpine:v3.22go1.24.6-r0ALPINE-CVE-2025-4674
Alpine:v3.23go1.24.5-r0ALPINE-CVE-2025-4674
Alpine:v3.24go1.24.5-r0ALPINE-CVE-2025-4674
Debian:12golang-1.19no fix listedDEBIAN-CVE-2025-4674
Debian:13golang-1.24no fix listedDEBIAN-CVE-2025-4674
Gotoolchain1.23.11, 1.24.5GO-2025-3828
Rocky Linux:8delve0:1.24.1-1.module+el8.10.0+1951+c74bd827RLSA-2025:13940
Rocky Linux:8delve0:1.24.1-1.module+el8.10.0+1987+42f155bbRLSA-2025:13940
Rocky Linux:8go-toolset0:1.24.6-1.module+el8.10.0+2048+bc5b2e29RLSA-2025:13940
Rocky Linux:10golang0:1.24.6-1.el10_0RLSA-2025:13941
Rocky Linux:8golang0:1.24.6-1.module+el8.10.0+2048+bc5b2e29RLSA-2025:13940
Rocky Linux:9golang0:1.24.6-1.el9_6RLSA-2025:13935
Ubuntu:22.04:LTSgolang-1.18no fix listedUBUNTU-CVE-2025-4674
Ubuntu:22.04:LTSgolang-1.20no fix listedUBUNTU-CVE-2025-4674
Ubuntu:22.04:LTSgolang-1.21no fix listedUBUNTU-CVE-2025-4674
Ubuntu:24.04:LTSgolang-1.21no fix listedUBUNTU-CVE-2025-4674
Ubuntu:22.04:LTSgolang-1.22no fix listedUBUNTU-CVE-2025-4674
Ubuntu:24.04:LTSgolang-1.22no fix listedUBUNTU-CVE-2025-4674
Ubuntu:22.04:LTSgolang-1.23no fix listedUBUNTU-CVE-2025-4674
Ubuntu:24.04:LTSgolang-1.23no fix listedUBUNTU-CVE-2025-4674
Ubuntu:25.10golang-1.23no fix listedUBUNTU-CVE-2025-4674
Ubuntu:26.04:LTSgolang-1.23no fix listedUBUNTU-CVE-2025-4674
Ubuntu:25.10golang-1.24no fix listedUBUNTU-CVE-2025-4674

Affected products (as reported)

VendorProductVersions
Go toolchain cmd/go 0 – before 1.23.111.24.0-0 – before 1.24.5

Weakness: CWE-73 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

References