CVE-2025-61731
CVE-2025-61731 is a high-severity vulnerability in Golang Go with a CVSS 3.x base score of 7.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-88.
Key facts
- Severity: High (CVSS 3.x base score 7.8)
- EPSS exploit prediction: 1% (41st percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2025-206447
- Weakness: CWE-88
- Affected product: Golang Go
- Published:
- Last modified:
Description
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.
Frequently asked questions
- What is CVE-2025-61731?
- 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.
- How severe is CVE-2025-61731?
- CVE-2025-61731 has a CVSS 3.x base score of 7.8, rated high severity. It is exploitable over local access with low attack complexity, requires low privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2025-61731 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (41st percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2025-61731?
- CVE-2025-61731 affects Golang Go. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2025-61731?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- Does CVE-2025-61731 have an EU (EUVD) identifier?
- Yes. CVE-2025-61731 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2025-206447.
- When was CVE-2025-61731 published?
- CVE-2025-61731 was published on 2026-01-28 and last updated on 2026-07-08.
References
- https://go.dev/cl/736711
- https://go.dev/issue/77100
- https://groups.google.com/g/golang-announce/c/Vd2tYVM8eUc
- https://pkg.go.dev/vuln/GO-2026-4339
- https://access.redhat.com/errata/RHSA-2026:12118
- https://access.redhat.com/errata/RHSA-2026:12282
- https://access.redhat.com/errata/RHSA-2026:13736
- https://access.redhat.com/errata/RHSA-2026:14100
- https://access.redhat.com/errata/RHSA-2026:14774
- https://access.redhat.com/errata/RHSA-2026:15091
- https://access.redhat.com/errata/RHSA-2026:17598
- https://access.redhat.com/errata/RHSA-2026:20088
- https://access.redhat.com/errata/RHSA-2026:21691
- https://access.redhat.com/errata/RHSA-2026:3556
- https://access.redhat.com/errata/RHSA-2026:3559
- https://access.redhat.com/errata/RHSA-2026:3855
- https://access.redhat.com/errata/RHSA-2026:4434
- https://access.redhat.com/errata/RHSA-2026:5133
- https://access.redhat.com/errata/RHSA-2026:5941
- https://access.redhat.com/errata/RHSA-2026:5942
- https://access.redhat.com/errata/RHSA-2026:5943
- https://access.redhat.com/errata/RHSA-2026:5944
- https://access.redhat.com/errata/RHSA-2026:5948
- https://access.redhat.com/errata/RHSA-2026:5950
- https://access.redhat.com/errata/RHSA-2026:5952
- https://access.redhat.com/errata/RHSA-2026:6949
- https://access.redhat.com/errata/RHSA-2026:7291
- https://access.redhat.com/errata/RHSA-2026:7385
- https://access.redhat.com/errata/RHSA-2026:7833
- https://access.redhat.com/errata/RHSA-2026:7834
Affected products (1)
- cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
More vulnerabilities in Golang Go
- CVE-2025-68121 — Critical (CVSS 10.0): During session resumption in crypto/tls, if the underlying Config has its ClientCAs or RootCAs fields mutated between…
- CVE-2026-27143 — Critical (CVSS 9.8): Arithmetic over induction variables in loops were not correctly checked for underflow or overflow. As a result, the…
- CVE-2024-24790 — Critical (CVSS 9.8): The various Is methods (IsPrivate, IsLoopback, etc) did not work as expected for IPv4-mapped IPv6 addresses, returning…
- CVE-2023-39320 — Critical (CVSS 9.8): The go.mod toolchain directive, introduced in Go 1.21, can be leveraged to execute scripts and binaries relative to the…
- CVE-2023-29405 — Critical (CVSS 9.8): The go command may execute arbitrary code at build time when using cgo. This may occur when running "go get" on a…
- CVE-2023-29404 — Critical (CVSS 9.8): The go command may execute arbitrary code at build time when using cgo. This may occur when running "go get" on a…
All CVEs affecting Golang Go →
Other CWE-88 (Argument Injection) vulnerabilities
- CVE-2026-57572 — Critical (CVSS 10.0): Crawl4AI is an open-source LLM-friendly web crawler and scraper. Prior to 0.9.0, the Docker API server accepted…
- CVE-2026-40281 — Critical (CVSS 10.0): Gotenberg is a Docker-powered stateless API for PDF files. In versions 8.30.1 and earlier, the metadata write endpoint…
- CVE-2023-6269 — Critical (CVSS 10.0): An argument injection vulnerability has been identified in the administrative web interface of the Atos Unify…
- CVE-2007-0882 — Critical (CVSS 10.0): Argument injection vulnerability in the telnet daemon (in.telnetd) in Solaris 10 and 11 (SunOS 5.10 and 5.11)…
- CVE-2004-0480 — Critical (CVSS 10.0): Argument injection vulnerability in IBM Lotus Notes 6.0.3 and 6.5 allows remote attackers to execute arbitrary code via…
- CVE-1999-0113 — Critical (CVSS 10.0): Some implementations of rlogin allow root access if given a -froot parameter.