Vulnerabilities · 2025 · Golang
CVE-2025-61731
Golang Go vulnerability
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.
Affected products
Go. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Golang Go runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Set the orderSystems that can be reached from the internet come first, then the rest.
References
- pkg.go.dev/vuln/GO-2026-4339 · Vendor Advisory
- go.dev/cl/736711 · Patch
- go.dev/issue/77100
- groups.google.com/g/golang-announce/c/Vd2tYVM8eUc
- access.redhat.com/errata/RHSA-2026:12118
- access.redhat.com/errata/RHSA-2026:12282
- access.redhat.com/errata/RHSA-2026:13736
- access.redhat.com/errata/RHSA-2026:14100
- nvd.nist.gov/vuln/detail/CVE-2025-61731
- cve.org/CVERecord?id=CVE-2025-61731
More vulnerabilities in Golang products
CVE-2026-42506CVE-2026-42502CVE-2026-27136CVE-2026-25681CVE-2026-25680CVE-2025-68121CVE-2025-68119CVE-2025-61732All 172
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.