Vulnerability details

CVE-2025-61731

Go toolchain cmd/goRed Hat Enterprise Linux 8Red Hat OpenShift Virtualization 4

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

CVSS 3.1
8.6High

Official 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.

CVSS scores

ScoreVersionSourceVector
7.8High 3.1 CISA ADP / Vulnrichment (CISA-ADP) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
8.6High 3.1 CVEProject cvelistV5 (CNA) (redhat-SADP) CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Affected products

VendorProductVersionsSource
Go toolchain cmd/go v < 1.24.12 CVEProject cvelistV5 (CNA)
Go toolchain cmd/go 1.25.0 ≤ v < 1.25.6 CVEProject cvelistV5 (CNA)
Red Hat Red Hat Enterprise Linux 8 All CVEProject cvelistV5 (CNA)
Red Hat Red Hat OpenShift Virtualization 4 All CVEProject cvelistV5 (CNA)

References and advisories

38
Kolun on Telegram @kolunsec Exploited CVEs, key news and a daily digest Alerts for this product's next CVEsFollow the product to get new vulnerabilities on Telegram.

Details

Published
2026-01-28
Last updated
2026-09-10
State
Published
Assigner (CNA)
Go

Exploit prediction (EPSS)

0.61%
Probability of exploitation in 30 days
49.4%
Percentile (among all CVEs)

SSVC assessment (CISA)

Automatable
No
Exploitation
None
Technical impact
Total

Weaknesses (CWE)

  • CWE-88
    Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')