CVE-2025-61731: Arbitrary file write using cgo pkg-config directive in cmd/go
Vulnerability summary
CVE-2025-61731 is a high (CVSS 7.8) vulnerability in go toolchain cmd/go. EPSS estimates a 0.61% chance of exploitation in the next 30 days, higher than 49.2% of scored vulnerabilities.
Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 34 · Related 34Timeline
- 28-01-2026PublishedVulnerability first disclosed.
- 10-09-2026Last modifiedVulnerability information updated.
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 metrics
7 scores · 7 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated8.6HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:HDiffers
- OSV · DebianEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · WolfiEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · ChainguardEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- NVDNIST7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · AlpineEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.61%
Chance of exploitation in the next 30 days
Percentile
49%
Versus all other CVEs
30-day change
Decrease -0.01 pp
From 0.62% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard198 products
- aactl< 0.4.12-r40
- actions-runner-controller< 0.13.1-r1 | < 0.13.1-r3
- actions-runner-controller-fips< 0.13.1-r1 | < 0.13.1-r5
- age< 1.3.1-r3 | < 1.3.1-r1
- age-fips< 1.3.1-r3 | < 1.3.1-r1
Alpine2 products
- etcd< 3.6.8-r0
- go≥ 1.25.0, < 1.24.12-r0 | ≥ 1.25.0, < 1.25.6-r0
2 vendors · 200 products · Showing 200 of 1945
References
46 linksShow all 46 references
- pkg.go.devWEB