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.
Metrics
Affected Vendors & Products
References
History
Wed, 28 Jan 2026 19:45:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | Arbitrary file write using cgo pkg-config directive in cmd/go | |
| References |
|
Status: PUBLISHED
Assigner: Go
Published:
Updated: 2026-01-28T19:30:30.844Z
Reserved: 2025-09-30T15:05:03.605Z
Link: CVE-2025-61731
No data.
Status : Received
Published: 2026-01-28T20:16:10.073
Modified: 2026-01-28T20:16:10.073
Link: CVE-2025-61731
No data.
OpenCVE Enrichment
No data.