Back to CVE records
High 7.8Published Jan 28, 2026

CVE-2025-61731Arbitrary file write using cgo pkg-config directive in cmd/go

Updated under an hour ago ()

Does this affect you?

It affects Go toolchain cmd/go and 12 other products. Add what you run to find out whether that includes you.

No exploitation reported and no EPSS estimate yet.

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.

CVSS
7.8 HIGH (v3.1, CISA ADP)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-78, CWE-88
Known exploited
Not in CISA's KEV catalog
EPSS (exploitation in the next 30 days)
Not loaded for this CVE
Assigned by
Go
NVD analysis
Modified
Record last updated
Sep 10, 2026
First seen by InfoSec Signals
Oct 9, 2026

Affected products

Affected products
Go toolchain cmd/go
go_toolchain:cmd_go (from the name)
before 1.24.12; from 1.25.0 before 1.25.6
CNA record
from 0:1.25.8-1.el10_1 not affected
CISA ADP
from 0:1.25.8-1.el10_0 not affected
CISA ADP
from 8020020260408140623.02f7cb7a not affected
CISA ADP
from 8040020260408080443.5081a262 not affected
CISA ADP
from 8060020260409063558.97d7f71f not affected
CISA ADP
from 8060020260409063558.97d7f71f not affected
CISA ADP
from 0:1.21.13-15.el9_4 not affected
CISA ADP
from 1.26.2-1.hum1 not affected
CISA ADP
from 1777002694 not affected
CISA ADP

References

References

The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.

Your cookie choices
We use essential cookies to run this site, and, only with your consent, an advertising cookie from Google to measure whether our ads lead to sign-ups and subscriptions. See our for details.