GO-2026-4339

Source
https://pkg.go.dev/vuln/GO-2026-4339
Import Source
https://vuln.go.dev/ID/GO-2026-4339.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2026-4339
Aliases
  • CVE-2025-61731
Published
2026-01-28T19:07:59Z
Modified
2026-01-28T19:41:17.732396Z
Summary
Arbitrary file write using cgo pkg-config directive in cmd/go
Details

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.

Database specific
{
    "review_status": "REVIEWED",
    "url": "https://pkg.go.dev/vuln/GO-2026-4339"
}
References
Credits
    • RyotaK (https://ryotak.net) of GMO Flatt Security Inc.

Affected packages

Go / toolchain

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.24.12
Introduced
1.25.0
Fixed
1.25.6

Ecosystem specific

{
    "imports": [
        {
            "path": "cmd/go"
        }
    ]
}

Database specific

source

"https://vuln.go.dev/ID/GO-2026-4339.json"