Go toolchain cmd/go
Arbitrary file write using cgo pkg-config directive in cmd/go
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.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS7.8high · scored by CISA ADP · CWE-78
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
Go toolchain cmd/go
- < 1.24.12
- >= 1.25.0, < 1.25.6
Fixed in 1.24.12, 1.25.6
Mitigation
Upgrade cmd/go to 1.24.12 or 1.25.6 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.