| { |
| "dataType": "CVE_RECORD", |
| "dataVersion": "5.0", |
| "cveMetadata": { |
| "cveId": "CVE-2025-61731" |
| }, |
| "containers": { |
| "cna": { |
| "providerMetadata": { |
| "orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc" |
| }, |
| "title": "Arbitrary file write using cgo pkg-config directive in cmd/go", |
| "descriptions": [ |
| { |
| "lang": "en", |
| "value": "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." |
| } |
| ], |
| "affected": [ |
| { |
| "vendor": "Go toolchain", |
| "product": "cmd/go", |
| "collectionURL": "https://pkg.go.dev", |
| "packageName": "cmd/go", |
| "versions": [ |
| { |
| "version": "0", |
| "lessThan": "1.24.12", |
| "status": "affected", |
| "versionType": "semver" |
| }, |
| { |
| "version": "1.25.0", |
| "lessThan": "1.25.6", |
| "status": "affected", |
| "versionType": "semver" |
| } |
| ], |
| "defaultStatus": "unaffected" |
| } |
| ], |
| "problemTypes": [ |
| { |
| "descriptions": [ |
| { |
| "lang": "en", |
| "description": "CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')" |
| } |
| ] |
| } |
| ], |
| "references": [ |
| { |
| "url": "https://go.dev/cl/736711" |
| }, |
| { |
| "url": "https://go.dev/issue/77100" |
| }, |
| { |
| "url": "https://groups.google.com/g/golang-announce/c/Vd2tYVM8eUc" |
| }, |
| { |
| "url": "https://pkg.go.dev/vuln/GO-2026-4339" |
| } |
| ], |
| "credits": [ |
| { |
| "lang": "en", |
| "value": "RyotaK (https://ryotak.net) of GMO Flatt Security Inc." |
| } |
| ] |
| } |
| } |
| } |