Go toolchain · Go · published 2026-01-28
CVE-2025-61731Arbitrary file write using cgo pkg-config directive in cmd/go
Routine No exploitation evidence; EPSS 0.6%.
CVE-2025-61731 is not known to be exploited in the wild. EPSS estimates a 0.6% chance of exploitation in the next 30 days, higher than 49% of all CVEs. This Go vulnerability: CVSS 7.8 (v3.1), a successful attack gives total control of the component. Fixed upstream in Go 1.25.6, 1.24.12. Routine: patch when convenient.
Jump to: Remediation Exploit intelAffected versionsDescription
Remediation#
Fixed upstream in Go 1.25.6, 1.24.12.
Patch events
Language runtimeGo
Go security releases: 1.25.6, 1.24.12
Upgrade to
1.25.61.24.12Why: CVE-2025-61726: EPSS 2.3% with high severity (CVSS 7.5).
Exploit intelligence#
| Signal | Value | Source |
|---|---|---|
| Known exploited | No | CISA KEV |
| Ransomware use | — | CISA KEV |
| EPSS (30-day exploitation probability) | 0.6% (49th pct) | FIRST EPSS v2026.06.15 |
| CVSS base score | 7.8 (v3.1)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | CNA / CISA ADP |
| SSVC exploitation | none | CISA Vulnrichment |
| SSVC automatable | No | CISA Vulnrichment |
| SSVC technical impact | total | CISA Vulnrichment |
Affected versions (from the CVE record)#
- Go toolchain cmd/go
0to before1.24.12(affected)1.25.0to before1.25.6(affected)
Description (from the CVE record)#
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.
Quoted from the CVE Program record.