CVE-2025-61731

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

HIGH
7.8
CVSS Score
Published: January 28, 2026 at 07:30 PM UTC
Updated: September 10, 2026 at 01:17 PM UTC
4 products affected across 3 vendorsGoEnterprise LinuxOpenShift Virtualization

Using cmd/go by Go toolchain?

Get instant alerts when new vulnerabilities affect cmd/go - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.6%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 1.24.121.25.0 ≤ v < 1.25.6
Affected range stops below 1.24.12, so it looks safe — our inference, not a vendor statement
Affected range stops below 1.25.6, so it looks safe — our inference, not a vendor statement
v < 1.24.121.25.0 ≤ v < 1.25.61.25.0
Affected range stops below 1.24.12, so it looks safe — our inference, not a vendor statement
Affected range stops below 1.25.6, so it looks safe — our inference, not a vendor statement
Vendor states this is fixed in 0:1.17.13-11.el9_0 (unaffected)
Vendor states this is fixed in 0:1.19.13-24.el9_2 (unaffected)
Vendor states this is fixed in 0:1.21.13-15.el9_4 (unaffected)
Vendor states this is fixed in 0:1.25.8-1.el10_0 (unaffected)
Vendor states this is fixed in 0:1.25.8-1.el10_1 (unaffected)
Vendor states this is fixed in 0:1.25.8-1.el9_6 (unaffected)
Vendor states this is fixed in 0:1.25.8-1.el9_7 (unaffected)
Vendor states this is fixed in 8020020260408140623.02f7cb7a (unaffected)
Vendor states this is fixed in 8040020260408080443.5081a262 (unaffected)
Vendor states this is fixed in 8060020260409063558.97d7f71f (unaffected)
Vendor states this is fixed in 8080020260331223648.6b4b45d8 (unaffected)
Vendor states this is fixed in 8100020260402232122.a3795dee (unaffected)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (40)

Patch
Source: cverecord
https://go.dev/cl/736711
Issue Tracking
Source: cverecord
https://go.dev/issue/77100
Mailing ListRelease Notes
Source: cverecord
https://groups.google.com/g/golang-announce/c/Vd2tYVM8eUc
Vendor Advisory
Source: cverecord
https://pkg.go.dev/vuln/GO-2026-4339
Source: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
https://access.redhat.com/errata/RHSA-2026:12118
Source: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
https://access.redhat.com/errata/RHSA-2026:12282
Source: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
https://access.redhat.com/errata/RHSA-2026:13736
Source: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
https://access.redhat.com/errata/RHSA-2026:14100

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.8HIGHCISA-ADP
Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-noinfoCWE-88

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card