Vulnerabilities

CVE-2025-61731

High 7.8 CVSS 3.1

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.

Description as published by the source, in English.

Key facts

Published
2026-01-28
Last modified
2026-09-10
Assigned by
security@golang.org
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scored by
134c704f-9b21-4f2e-91b3-4a467353bcc0
Probability of exploitation
0.5 % higher than 42 % of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15
Fix available
Yes, see references

Affected products

Vendor Product Versions Status
Golang Go < 1.24.12 Affected
Golang Go ≥ 1.25.0, < 1.25.6 Affected

Weakness type

References

Does this affect you?

A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.

Check your asset list Browse all vulnerabilities