CVE-2025-61731 - CVE House
Back to Database
Status published Unknown CVE-2025-61731

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

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

Impact Analysis

Refer to official advisory for detailed impact metrics.

Remediation

Ensure systems are updated to the latest vendor-supplied patch levels.

THREAT MONITOR

Am I Vulnerable?

Launch our assessment wizard to check if your infrastructure is exposed to • CVE-2025-61731

Credits & Attribution

The following person or organization is credited with identifying this vulnerability, as recorded in the NVD database:

  • RyotaK (https://ryotak.net) of GMO Flatt Security Inc.

Affected Vendor

Go toolchain

View all reports →

Affected Software

cmd/go
Vulnerable Versions:
0, 1.25.0

Timeline

Official Publish: January 28th, 2026
Last Modified: July 15th, 2026
Added to House: July 22nd, 2026

CVSS Vectors

No vector data available

Weaknesses (CWE)

No CWE data available

MITRE ATT&CK TTPs

No associated TTPs found for this vulnerability.