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
Advisories
No advisories yet.
Fixes
Solution
No solution given by the vendor.
Workaround
No workaround given by the vendor.
References
History
Thu, 29 Jan 2026 10:15:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Gotoolchain
Gotoolchain cmd/go |
|
| Vendors & Products |
Gotoolchain
Gotoolchain cmd/go |
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 |
|
Projects
Sign in to view the affected projects.
Status: PUBLISHED
Assigner: Go
Published:
Updated: 2026-01-29T04:55:55.766Z
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
Updated: 2026-01-29T09:08:43Z
Weaknesses
No weakness.