{"id":"GO-2026-4339","revision":"8abea5885189471c84863ae80711f495","records":[{"revision":"8abea5885189471c84863ae80711f495","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-4339","aliases":["BIT-golang-2025-61731","CVE-2025-61731"],"title":"Arbitrary file write using cgo pkg-config directive in cmd/go","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.\n\nThe \"#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.","state":0,"publishedAt":"2026-01-28T19:07:59+00:00","modifiedAt":"2026-08-05T10:56:57.9919305+00:00","affected":[{"ecosystem":"Go","name":"toolchain","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.24.12"},{"kind":"introduced","version":"1.25.0"},{"kind":"fixed","version":"1.25.6"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://go.dev/cl/736711","https://go.dev/issue/77100","https://groups.google.com/g/golang-announce/c/Vd2tYVM8eUc"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-4339","license":"OSV · upstream source license applies","key":"osv:GO-2026-4339","identifiers":["GO-2026-4339","BIT-golang-2025-61731","CVE-2025-61731"]},"retained":false,"historicalAffected":[]}],"coverage":[]}