ADVISORIES

Red Hat VEX

RHVEX-CVE-2025-61731

cmd/go: cmd/go: Arbitrary file write via malicious pkg-config directive

Important No fix available CVE-2025-61731

Details

A flaw was found in cmd/go. An attacker can exploit this by building a malicious Go source file that uses the '#cgo pkg-config:' directive. This allows the attacker to write to an arbitrary file with partial control over its content, by providing a '--log-file' argument to the pkg-config command. This vulnerability can lead to arbitrary file write.

Affected packages

EcosystemPackageAffected versions
Red Hat:enterprise_linux:8go-toolset
All versions, no fix yet
Red Hat:enterprise_linux:8golang
All versions, no fix yet
Red Hat:enterprise_linux:8golang-bin
All versions, no fix yet
Red Hat:enterprise_linux:8golang-docs
All versions, no fix yet
Red Hat:enterprise_linux:8golang-misc
All versions, no fix yet
Red Hat:enterprise_linux:8golang-race
All versions, no fix yet
Red Hat:enterprise_linux:8golang-src
All versions, no fix yet
Red Hat:enterprise_linux:8golang-tests
All versions, no fix yet

References