CVE-2025-61731

high

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.

References

https://pkg.go.dev/vuln/GO-2026-4339

https://groups.google.com/g/golang-announce/c/Vd2tYVM8eUc

https://go.dev/issue/77100

https://go.dev/cl/736711

Details

Source: Mitre, NVD

Published: 2026-01-28

Updated: 2026-02-06

Risk Information

CVSS v2

Base Score: 6.8

Vector: CVSS2#AV:L/AC:L/Au:S/C:C/I:C/A:C

Severity: Medium

CVSS v3

Base Score: 7.8

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Severity: High

EPSS

EPSS: 0.00011