Name
CVE-2025-61731
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.
CWEs
Published Date
Updated Date
Workaround
-
Advisories
https://go.dev/issue/77100Issue Tracking
https://pkg.go.dev/vuln/GO-2026-4339Vendor Advisory
Analysis#
Vulnerability Ratings#
7.8
CVSSv31
NaN
other
Others affected components#
Name
Project
Project Version
Version
Status
openwrt
master
1.24.13-r1
Not Affected
openwrt
master
1.26.4-r1
Not Affected
openwrt
openwrt-25.12
1.24.13-r1
Not Affected
openwrt
openwrt-25.12
1.26.4-r1
Not Affected
yocto
master
1.26.4
Not Affected
yocto
master
1.26.4
Not Affected
yocto
scarthgap
1.22.12
Patched
yocto
scarthgap
1.22.12
Exploitable
Resolved with patches#
go (yocto:scarthgap)
#
Title
Author
Resolve
1
[release-branch.go1.24] cmd/go/internal/work: sanitize flags
Neal Patel <nealpatel@google.com>
CVE-2025-61731