cve.bz

CVE-2025-61731 golang go: Argument Injection

7.8 highEPSS 0.6%Fix available

High (7.8) in golang go. EPSS 0.6% estimated probability of exploitation activity in the next 30 days. Fixed in toolchain 1.24.12, 1.25.6.

On this page
Building a malicious file with cmd/go can cause can cause a write to an attacker-controlled file with partial control of the file content. The "#cgo pkg-config:" directive in a Go source file provides command-line arguments to provide to the Go pkg-config command. An attacker can provide a "--log-file" argument to this directive, causing pkg-config to write to an attacker-controlled location.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.6% (unchanged from 0.6% a week ago; 0.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 49th 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 2026-01-29. 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-88 Improper Neutralization of Argument Delimiters in a Command (Argument Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-61731 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-61731?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-61731?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-61731 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.24.12
Go toolchain cmd/gofrom 1.25.0 before 1.25.6

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GO-2026-4339Gotoolchain<1.24.12
>=1.25.0 <1.25.6
1.24.12, 1.25.6

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12golang-1.19no fix listedDEBIAN-CVE-2025-61731
Debian13golang-1.24no fix listedDEBIAN-CVE-2025-61731
Ubuntu14.04:LTS, 16.04:LTS, 18.04:LTSgolang-1.10no fix listedUBUNTU-CVE-2025-61731
Ubuntu20.04:LTSgolang-1.13, golang-1.14, golang-1.18 and 3 moreno fix listedUBUNTU-CVE-2025-61731
Ubuntu22.04:LTSgolang-1.17, golang-1.18, golang-1.20 and 5 moreno fix listedUBUNTU-CVE-2025-61731
Ubuntu24.04:LTSgolang-1.21, golang-1.22, golang-1.23 and 1 moreno fix listedUBUNTU-CVE-2025-61731
Ubuntu25.10golang-1.23, golang-1.24, golang-1.25no fix listedUBUNTU-CVE-2025-61731
Ubuntu26.04:LTSgolang-1.23, golang-1.24no fix listedUBUNTU-CVE-2025-61731
UbuntuPro:16.04:LTSgolang-1.13, golang-1.18no fix listedUBUNTU-CVE-2025-61731
UbuntuPro:18.04:LTSgolang-1.13, golang-1.16, golang-1.18no fix listedUBUNTU-CVE-2025-61731
UbuntuPro:20.04:LTSgolang-1.16no fix listedUBUNTU-CVE-2025-61731
UbuntuPro:22.04:LTSgolang-1.13no fix listedUBUNTU-CVE-2025-61731
Red Hatenterprise_linux:8::appstreamdelve, delve-debuginfo, delve-debugsource0:1.25.2-1.module+el8.10.0+23746+9db33b5eRHSA-2026:6949
Red Hatenterprise_linux:8::appstreamgolang, go-toolset, golang-bin and 5 more0:1.25.8-1.module+el8.10.0+24168+9fd3a552RHSA-2026:6949
Red Hatenterprise_linux:9::appstreamgolang, go-toolset, golang-bin and 5 more0:1.25.8-1.el9_7RHSA-2026:5942
Red Hatenterprise_linux:10.1golang, go-toolset, golang-bin and 5 more0:1.25.8-1.el10_1RHSA-2026:5941
Red Hatenterprise_linux_eus:10.0golang, go-toolset, golang-bin and 5 more0:1.25.8-1.el10_0RHSA-2026:5943
Red Hathummingbird:1golang1.25, golang1.25-bin, golang1.25-src and 4 more0:1.25.9-1.hum1RHSA-2026:7385
Red Hathummingbird:1golang1.26, golang1.26-bin, golang1.26-src and 4 more0:1.26.2-1.hum1RHSA-2026:7291
Red Hatrhel_aus:8.2::appstreamdelve, delve-debuginfo, delve-debugsource0:1.3.2-3.module+el8.2.0+5581+896cb53eRHSA-2026:7878
Red Hatrhel_aus:8.2::appstreamgo-toolset0:1.13.15-1.module+el8.2.0+7662+fa98b974RHSA-2026:7878
Red Hatrhel_aus:8.2::appstreamgolang, golang-bin, golang-src and 4 more0:1.13.15-15.module+el8.2.0+24191+89968df7RHSA-2026:7878
Red Hatrhel_aus:8.4::appstream, rhel_eus_long_life:8.4::appstreamdelve, delve-debuginfo, delve-debugsource0:1.5.0-2.module+el8.4.0+8864+58b0fcdbRHSA-2026:7879
Red Hatrhel_aus:8.4::appstream, rhel_eus_long_life:8.4::appstreamgo-toolset0:1.15.14-3.module+el8.4.0+22765+91da4d3fRHSA-2026:7879
11 more for Red Hat in the JSON and on Red Hat's page.
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 8 morego1.241.24.12-150000.1.53.1SUSE-SU-2026:0219-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 8 morego1.251.25.6-150000.1.26.1SUSE-SU-2026:0218-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.24-openssl1.24.12-150000.1.18.1SUSE-SU-2026:0296-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 SP7, Linux Enterprise Server 15 SP6-LTSS, Linux Enterprise Server for SAP Applications 15 SP6go1.24-openssl1.24.12-150600.13.15.1SUSE-SU-2026:0308-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
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0go1.241.24.12-160000.1.1SUSE-SU-2026:20122-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0go1.24-openssl1.24.13-160000.1.1SUSE-SU-2026:20629-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0go1.251.25.6-160000.1.1SUSE-SU-2026:20132-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0go1.25-openssl1.25.7-160000.1.1SUSE-SU-2026:20623-1
openSUSELeap 15.6go1.241.24.12-150000.1.53.1SUSE-SU-2026:0219-1
openSUSELeap 15.6go1.24-openssl1.24.12-150600.13.15.1SUSE-SU-2026:0308-1
openSUSELeap 15.6go1.251.25.6-150000.1.26.1SUSE-SU-2026:0218-1
openSUSELeap 15.6go1.25-openssl1.25.6-150600.13.9.1SUSE-SU-2026:0298-1
openSUSELeap 15.6govulncheck-vulndb0.0.20260128T190828-150000.1.143.1SUSE-SU-2026:0354-1
openSUSELeap 16.0coredns1.14.2-bp160.1.1openSUSE-SU-2026:20619-1
openSUSELeap 16.0go1.241.24.12-160000.1.1openSUSE-SU-2026:20077-1
openSUSELeap 16.0go1.24-openssl1.24.13-160000.1.1openSUSE-SU-2026:20308-1
openSUSELeap 16.0go1.251.25.6-160000.1.1openSUSE-SU-2026:20085-1
openSUSELeap 16.0go1.25-openssl1.25.7-160000.1.1openSUSE-SU-2026:20301-1
openSUSELeap 16.0govulncheck-vulndb0.0.20260723T184607-160000.1.1openSUSE-SU-2026:21483-1
openSUSETumbleweedgo1.241.24.12-1.1openSUSE-SU-2026:10063-1
1 more for openSUSE in the JSON and on openSUSE's page.
AlmaLinux8delve1.25.2-1.module_el8.10.0+4074+24330916ALSA-2026:6949
AlmaLinux8golang, go-toolset, golang-bin and 5 more1.25.8-1.module_el8.10.0+4156+92f0ae2fALSA-2026:6949
AlmaLinux9golang, go-toolset, golang-bin and 5 more1.25.8-1.el9_7ALSA-2026:5942
AlmaLinux10golang-src, golang-docs, golang-misc and 1 more1.25.8-1.el10_1.alma.1ALSA-2026:5941
Rocky Linux8delve0:1.25.2-1.module+el8.10.0+40035+ee0a7047RLSA-2026:6949
Rocky Linux9golang0:1.25.8-1.el9_7RLSA-2026:5942
Rocky Linux10golang0:1.25.8-1.el10_1RLSA-2026:5941
Alpinev3.22go1.24.12-r0ALPINE-CVE-2025-61731
Alpinev3.23, v3.24etcd3.6.8-r0ALPINE-CVE-2025-61731
Alpinev3.23, v3.24go1.25.6-r0ALPINE-CVE-2025-61731
Azure Linux3golangno fix listedAZL-78935 AZL-98568
Alpaquita23, 25go1.24.12-r0BELL-CVE-2025-61731
Alpaquita25, streametcd3.6.11-r1BELL-CVE-2025-61731
Alpaquitastreamgo1.25.6-r0BELL-CVE-2025-61731
BellSoft Hardened Containers23, 25go1.24.12-r0BELL-CVE-2025-61731
BellSoft Hardened Containersstreamgo1.25.6-r0BELL-CVE-2025-61731

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 compiling a malicious Go source file can cause `pkg-config` to create or append data to files at attacker-chosen locations, subject to the permissions of the build user. This can enable unintended filesystem modifications during the build process, which can lead to broken builds, alter tool behavior, and poison caches or artifacts, even without direct code execution.

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.25.8-1.el10_1Fixed 2026-03-26RHSA-2026:5941
Red Hat Enterprise Linux 10.0 Extended Update Supportgolang-0:1.25.8-1.el10_0Fixed 2026-03-26RHSA-2026:5943
Red Hat Enterprise Linux 8go-toolset:rhel8-8100020260402232122.a3795deeFixed 2026-04-08RHSA-2026:6949
Red Hat Enterprise Linux 8.2 Advanced Update Supportgo-toolset:rhel8-8020020260408140623.02f7cb7aFixed 2026-04-13RHSA-2026:7878
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Supportgo-toolset:rhel8-8040020260408080443.5081a262Fixed 2026-04-13RHSA-2026:7879
Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-Ongo-toolset:rhel8-8040020260408080443.5081a262Fixed 2026-04-13RHSA-2026:7879
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Supportgo-toolset:rhel8-8060020260409063558.97d7f71fFixed 2026-04-13RHSA-2026:7876
Red Hat Enterprise Linux 8.6 Telecommunications Update Servicego-toolset:rhel8-8060020260409063558.97d7f71fFixed 2026-04-13RHSA-2026:7876
Red Hat Enterprise Linux 8.6 Update Services for SAP Solutionsgo-toolset:rhel8-8060020260409063558.97d7f71fFixed 2026-04-13RHSA-2026:7876
Red Hat Enterprise Linux 8.8 Telecommunications Update Servicego-toolset:rhel8-8080020260331223648.6b4b45d8Fixed 2026-04-13RHSA-2026:7877
Red Hat Enterprise Linux 8.8 Update Services for SAP Solutionsgo-toolset:rhel8-8080020260331223648.6b4b45d8Fixed 2026-04-13RHSA-2026:7877
Red Hat Enterprise Linux 9golang-0:1.25.8-1.el9_7Fixed 2026-03-26RHSA-2026:5942
Red Hat Enterprise Linux 9.0 Update Services for SAP Solutionsgolang-0:1.17.13-11.el9_0Fixed 2026-04-13RHSA-2026:7883
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutionsgolang-0:1.19.13-24.el9_2Fixed 2026-04-13RHSA-2026:7833
Red Hat Enterprise Linux 9.4 Extended Update Supportgolang-0:1.21.13-15.el9_4Fixed 2026-04-13RHSA-2026:7834
Red Hat Enterprise Linux 9.6 Extended Update Supportgolang-0:1.25.8-1.el9_6Fixed 2026-03-26RHSA-2026:5944
OpenShift Service Mesh 2openshift-golang-builder-containerAffected
OpenShift Service Mesh 3openshift-golang-builder-containerAffected
Red Hat Enterprise Linux 8golangAffected
Red Hat OpenShift Virtualization 4openshift-golang-builder-containerAffected
484 more in the JSON and on Red Hat's page.

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

Attack patterns (CAPEC)

  • CAPEC-41 Using Meta-characters in E-mail Headers to Inject Malicious Payloads Likelihood: High · Severity: High
  • CAPEC-88 OS Command Injection Likelihood: High · Severity: High
  • CAPEC-137 Parameter Injection Likelihood: Medium · Severity: Medium
  • CAPEC-174 Flash Parameter Injection Likelihood: High · Severity: Medium
  • CAPEC-460 HTTP Parameter Pollution (HPP) Severity: Medium

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

References

Check your stackJSON