Arbitrary file write using cgo pkg-config directive in cmd/go
Historical advisory saved 24 Oct 2026 13:19:41 UTC. The publisher may have updated it since then. Latest advisory.
osv · GO-2026-4339
PublishedBuilding 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.
- Source published
- 28 Jan 2026 19:07:59 UTC
- Source modified
- 5 Aug 2026 10:56:57 UTC
- Saved here
- 24 Oct 2026 13:19:41 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · OSV · upstream source license applies. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.