{"cve":"CVE-2025-61731","nvd":{"published":"2026-01-28T20:16:10.073","modified":"2026-09-10T13:17:10.037","status":"Modified","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_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8},"cwes":["CWE-88"],"references":["https://go.dev/cl/736711","https://go.dev/issue/77100","https://groups.google.com/g/golang-announce/c/Vd2tYVM8eUc","https://pkg.go.dev/vuln/GO-2026-4339","https://access.redhat.com/errata/RHSA-2026:12118"],"products":["golang:go"],"source":"nvd","synced_at":"2026-10-19T22:22:27.261130201+00:00"},"epss":{"cve":"CVE-2025-61731","score":0.0061,"percentile":0.49238,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GO-2026-4339","url":"https://osv.dev/vulnerability/GO-2026-4339","summary":"Arbitrary file write using cgo pkg-config directive in cmd/go","modified":"2026-08-05T10:56:57.991930466Z","packages":[{"ecosystem":"Go","name":"toolchain","purl":"pkg:golang/toolchain","ranges":["<1.24.12",">=1.25.0 <1.25.6"],"fixed":["1.24.12","1.25.6"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}