Go toolchain · Go · published 2026-01-28

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

Routine No exploitation evidence; EPSS 0.6%.

CVE-2025-61731 is not known to be exploited in the wild. EPSS estimates a 0.6% chance of exploitation in the next 30 days, higher than 49% of all CVEs. This Go vulnerability: CVSS 7.8 (v3.1), a successful attack gives total control of the component. Fixed upstream in Go 1.25.6, 1.24.12. Routine: patch when convenient.

Share this

Remediation#

Fixed upstream in Go 1.25.6, 1.24.12.

Patch events

  1. This monthSecurity release

    Language runtimeGo

    Go security releases: 1.25.6, 1.24.12

    Upgrade to 1.25.61.24.12

    Why: CVE-2025-61726: EPSS 2.3% with high severity (CVSS 7.5).

Exploit intelligence#

SignalValueSource
Known exploitedNoCISA KEV
Ransomware use—CISA KEV
EPSS (30-day exploitation probability)0.6% (49th pct)FIRST EPSS v2026.06.15
CVSS base score7.8 (v3.1)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CNA / CISA ADP
SSVC exploitationnoneCISA Vulnrichment
SSVC automatableNoCISA Vulnrichment
SSVC technical impacttotalCISA Vulnrichment

Affected versions (from the CVE record)#

Description (from the CVE record)#

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.

Quoted from the CVE Program record.

Elsewhere#

Distro status: Debian · Ubuntu · Red Hat · Alpine

Something wrong on this page?
Anonymous. Reports are checked against the primary source.

Also on today's list

See today's list → · Coming up →