High severity · published Jan 28, 2026
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
7.8
CVSS
0.6%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.6% · higher than 49% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
GO
GO · Golang
before 1.24.12; 1.25.0 before 1.25.6 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-61731
CVE.org
https://www.cve.org/CVERecord?id=CVE-2025-61731
Patch
https://go.dev/cl/736711
Issue Tracking
https://go.dev/issue/77100
Mailing List
https://groups.google.com/g/golang-announce/c/Vd2tYVM8eUc
Vendor Advisory
https://pkg.go.dev/vuln/GO-2026-4339
access.redhat.com
https://access.redhat.com/errata/RHSA-2026:12118
access.redhat.com
https://access.redhat.com/errata/RHSA-2026:12282
More from GO
8.1
CVE-2020-0601
Microsoft Windows CryptoAPI Spoofing Vulnerability
7.5
CVE-2023-44487
HTTP/2 Rapid Reset Attack Vulnerability
10.0
CVE-2025-68121
During session resumption in crypto/tls, if the underlying Config has its ClientCAs or RootCAs fields mutated between the initial handshake and the resumed handshake, the resumed…
9.8
CVE-2026-27143
Missing bound checks can lead to memory corruption in safe Go in cmd/compile
9.8
CVE-2024-24790
The various Is methods (IsPrivate, IsLoopback, etc) did not work as expected for IPv4-mapped IPv6 addresses, returning false for addresses which would return true in their…
