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.53% 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
Weakness Enumeration
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
- Modified
Frequently Asked Questions
What is CVE-2025-61731?
How severe is CVE-2025-61731?
How do I fix CVE-2025-61731?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2025
- CVE-2025-61726The net/url package does not set a limit on the number of qu…7.5
- CVE-2025-61727An excluded subdomain constraint in a certificate chain does…6.5
- CVE-2025-61728archive/zip uses a super-linear file name indexing algorithm…6.5
- CVE-2025-61729Within HostnameError.Error(), when constructing an error str…7.5
- CVE-2025-6173A vulnerability classified as critical was found in Webkul Q…7.2
- CVE-2025-61730During the TLS 1.3 handshake if multiple messages are sent i…5.3
- CVE-2025-61732A discrepancy between how Go and C/C++ comments were parsed …8.6
- CVE-2025-61733Authentication Bypass Using an Alternate Path or Channel vul…7.5
- CVE-2025-61734Files or Directories Accessible to External Parties vulnerab…7.5
- CVE-2025-61735Server-Side Request Forgery (SSRF) vulnerability in Apache K…7.3
- CVE-2025-61736Successful exploitation of this vulnerability could result i…7.1
- CVE-2025-61738Under certain circumstances, attacker can capture the networ…2.3
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
