cve.bz

CVE-2025-4674 golang go: External Control of File Name or Path

8.6 highEPSS 0.5%Fix available

High (8.6) in golang go. EPSS 0.5% estimated probability of exploitation activity in the next 30 days. Fixed in toolchain 1.23.11, 1.24.5.

On this page
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.

Severity

CVSS 3.1

8.6 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
EPSS
0.5% (unchanged from 0.5% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 42nd percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2025-08-06. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-73 External Control of File Name or Path
OWASP Top 10
A06:2025 Insecure Design
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-4674 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-4674?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-4674?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-4674 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Go toolchain cmd/gobefore 1.23.11
Go toolchain cmd/gofrom 1.24.0-0 before 1.24.5

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GO-2025-3828Gotoolchain<1.23.11
>=1.24.0-0 <1.24.5
1.23.11, 1.24.5

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12golang-1.19no fix listedDEBIAN-CVE-2025-4674
Debian13golang-1.24no fix listedDEBIAN-CVE-2025-4674
Ubuntu20.04:LTSgolang-1.18, golang-1.20, golang-1.21 and 1 moreno fix listedUBUNTU-CVE-2025-4674
Ubuntu22.04:LTSgolang-1.18, golang-1.20, golang-1.21 and 2 moreno fix listedUBUNTU-CVE-2025-4674
Ubuntu24.04:LTSgolang-1.21, golang-1.22, golang-1.23no fix listedUBUNTU-CVE-2025-4674
Ubuntu25.10golang-1.23, golang-1.24no fix listedUBUNTU-CVE-2025-4674
Ubuntu26.04:LTSgolang-1.23no fix listedUBUNTU-CVE-2025-4674
UbuntuPro:16.04:LTS, Pro:18.04:LTSgolang-1.18no fix listedUBUNTU-CVE-2025-4674
Red Hatenterprise_linux:8::appstreamdelve, delve-debuginfo, delve-debugsource0:1.24.1-1.module+el8.10.0+22945+b2c96a17RHSA-2025:13940
Red Hatenterprise_linux:8::appstreamgolang, go-toolset, golang-bin and 4 more0:1.24.6-1.module+el8.10.0+23407+428597c7RHSA-2025:13940
Red Hatenterprise_linux:9::appstreamgolang, go-toolset, golang-bin and 5 more0:1.24.6-1.el9_6RHSA-2025:13935
Red Hatenterprise_linux:10.0golang, go-toolset, golang-bin and 5 more0:1.24.6-1.el10_0RHSA-2025:13941
Red Hatrhel_e4s:8.8::appstream, rhel_tus:8.8::appstreamdelve, delve-debuginfo, delve-debugsource0:1.9.1-1.module+el8.8.0+16778+5fbb74f5RHSA-2025:14093
Red Hatrhel_e4s:8.8::appstream, rhel_tus:8.8::appstreamgo-toolset0:1.19.13-3.module+el8.8.0+22903+37387f31RHSA-2025:14093
Red Hatrhel_e4s:8.8::appstream, rhel_tus:8.8::appstreamgolang, golang-bin, golang-src and 4 more0:1.19.13-16.module+el8.8.0+23410+958e78d9RHSA-2025:14093
Red Hatrhel_e4s:9.2::appstreamgolang, golang-bin, golang-src and 4 more0:1.19.13-18.el9_2RHSA-2025:13939
Red Hatrhel_eus:9.4::appstreamgolang, go-toolset, golang-bin and 4 more0:1.21.13-10.el9_4RHSA-2025:13936
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 11 morego1.231.23.11-150000.1.37.1SUSE-SU-2025:02296-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 11 morego1.241.24.5-150000.1.29.1SUSE-SU-2025:02295-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 11 morego1.251.25.0-150000.1.5.1SUSE-SU-2025:02924-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 9 morego1.23-openssl1.23.12-150000.1.18.1SUSE-SU-2025:02812-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 9 morego1.24-openssl1.24.6-150000.1.12.1SUSE-SU-2025:02837-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 9 morego1.25-openssl1.25.0-150000.1.3.1SUSE-SU-2025:03115-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise High Performance Computing 15 SP5-ESPOS and 5 morego1.25-openssl1.25.6-150000.1.9.1SUSE-SU-2026:0297-1
SUSELinux Enterprise Module for Development Tools 15 SP6, Linux Enterprise Module for Development Tools 15 SP7go1.23-openssl1.23.12-150600.13.9.1SUSE-SU-2025:03159-1
SUSELinux Enterprise Module for Development Tools 15 SP6, Linux Enterprise Module for Development Tools 15 SP7go1.24-openssl1.24.6-150600.13.9.1SUSE-SU-2025:03158-1
SUSELinux Enterprise Module for Development Tools 15 SP6, Linux Enterprise Module for Development Tools 15 SP7go1.25-openssl1.25.0-150600.13.3.1SUSE-SU-2025:03161-1
SUSELinux Enterprise Module for Development Tools 15 SP7, Linux Enterprise Server 15 SP6-LTSS, Linux Enterprise Server for SAP Applications 15 SP6go1.25-openssl1.25.6-150600.13.9.1SUSE-SU-2026:0298-1
openSUSELeap 15.6go1.231.23.11-150000.1.37.1SUSE-SU-2025:02296-1
openSUSELeap 15.6go1.23-openssl1.23.12-150600.13.9.1SUSE-SU-2025:03159-1
openSUSELeap 15.6go1.241.24.5-150000.1.29.1SUSE-SU-2025:02295-1
openSUSELeap 15.6go1.24-openssl1.24.6-150600.13.9.1SUSE-SU-2025:03158-1
openSUSELeap 15.6go1.251.25.0-150000.1.5.1SUSE-SU-2025:02924-1
openSUSELeap 15.6go1.25-openssl1.25.0-150600.13.3.1SUSE-SU-2025:03161-1
openSUSELeap 15.6go1.25-openssl1.25.6-150600.13.9.1SUSE-SU-2026:0298-1
openSUSETumbleweedgo1.231.23.11-1.1openSUSE-SU-2025:15328-1
openSUSETumbleweedgo1.241.24.5-1.1openSUSE-SU-2025:15329-1
openSUSETumbleweedgo1.251.25rc2-1.1openSUSE-SU-2025:15330-1
openSUSETumbleweedgovulncheck-vulndb0.0.20250730T213748-1.1openSUSE-SU-2025:15405-1
AlmaLinux8delve1.24.1-1.module_el8.10.0+3977+66935a26ALSA-2025:13940
AlmaLinux8golang, go-toolset, golang-bin and 4 more1.24.6-1.module_el8.10.0+4033+4bf8b620ALSA-2025:13940
AlmaLinux9golang, go-toolset, golang-bin and 5 more1.24.6-1.el9_6ALSA-2025:13935
AlmaLinux10golang-src, golang-docs, golang-misc and 1 more1.24.6-1.el10_0.alma.1ALSA-2025:13941
Rocky Linux8delve0:1.24.1-1.module+el8.10.0+1951+c74bd827RLSA-2025:13940
Rocky Linux8delve0:1.24.1-1.module+el8.10.0+1987+42f155bbRLSA-2025:13940
Rocky Linux8golang, go-toolset0:1.24.6-1.module+el8.10.0+2048+bc5b2e29RLSA-2025:13940
Rocky Linux9golang0:1.24.6-1.el9_6RLSA-2025:13935
Rocky Linux10golang0:1.24.6-1.el10_0RLSA-2025:13941
Alpinev3.22go1.24.6-r0ALPINE-CVE-2025-4674
Alpinev3.23, v3.24go1.24.5-r0ALPINE-CVE-2025-4674
Azure Linux2golang1.18.8-10AZL-66098
Azure Linux2golang1.22.7-5AZL-66101
Alpaquita23go1.23.11-r0BELL-CVE-2025-4674
Alpaquita25go1.24.6-r0BELL-CVE-2025-4674
Alpaquitastreamgo1.24.5-r0BELL-CVE-2025-4674
BellSoft Hardened Containers23go1.23.11-r0BELL-CVE-2025-4674
BellSoft Hardened Containers25go1.24.6-r0BELL-CVE-2025-4674
BellSoft Hardened Containersstreamgo1.24.5-r0BELL-CVE-2025-4674

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita · BellSoft Hardened Containers.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This vulnerability is Important rather than Moderate because it enables arbitrary command execution at the tooling level before any code is built or reviewed, effectively compromising the software supply chain at its earliest stage. Unlike flaws that require user interaction with the code itself, this issue is triggered simply by running go operations on a malicious repository—an action routinely performed by developers and automated build systems. The problem lies in cmd/go’s unsafe interpretation of cross-VCS metadata, allowing an attacker to inject commands that execute with the privileges of the go process.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10golang-0:1.24.6-1.el10_0Fixed 2025-08-18RHSA-2025:13941
Red Hat Enterprise Linux 8go-toolset:rhel8-8100020250813120739.a3795deeFixed 2025-08-18RHSA-2025:13940
Red Hat Enterprise Linux 8.8 Telecommunications Update Servicego-toolset:rhel8-8080020250814081429.6b4b45d8Fixed 2025-08-19RHSA-2025:14093
Red Hat Enterprise Linux 8.8 Update Services for SAP Solutionsgo-toolset:rhel8-8080020250814081429.6b4b45d8Fixed 2025-08-19RHSA-2025:14093
Red Hat Enterprise Linux 9golang-0:1.24.6-1.el9_6Fixed 2025-08-18RHSA-2025:13935
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutionsgolang-0:1.19.13-18.el9_2Fixed 2025-08-18RHSA-2025:13939
Red Hat Enterprise Linux 9.4 Extended Update Supportgolang-0:1.21.13-10.el9_4Fixed 2025-08-18RHSA-2025:13936

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-4674.

Attack patterns (CAPEC)

  • CAPEC-13 Subverting Environment Variable Values Likelihood: High · Severity: Very High
  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-72 URL Encoding Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-80 Using UTF-8 Encoding to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-267 Leverage Alternate Encoding Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON