CVE-2025-61731
Last modified
CVE-2025-61731 is a high-severity vulnerability rated 7.8/10 on the CVSS scale. 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. EPSS estimates a 0.36% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Golang | Go | < 1.24.12 |
| Golang | Go | >= 1.25.0, < 1.25.6 |
References
- https://go.dev/issue/77100Issue Tracking
- https://groups.google.com/g/golang-announce/c/Vd2tYVM8eUcMailing List, Release Notes
- https://pkg.go.dev/vuln/GO-2026-4339Vendor Advisory
Timeline
- Published
- Last Modified
- Status
- Analyzed
Frequently Asked Questions
What is CVE-2025-61731?
How severe is CVE-2025-61731?
How do I fix CVE-2025-61731?
Are you affected by CVE-2025-61731?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
