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.

Project Subscriptions

Vendors Products
Gotoolchain Subscribe
Advisories

No advisories yet.

Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Fri, 06 Feb 2026 18:45:00 +0000

Type Values Removed Values Added
First Time appeared Golang
Golang go
Weaknesses NVD-CWE-noinfo
CPEs cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
Vendors & Products Golang
Golang go

Thu, 05 Feb 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-88
References
Metrics threat_severity

None

threat_severity

Important


Thu, 29 Jan 2026 17:15:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


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.

cve-icon MITRE

Status: PUBLISHED

Assigner: Go

Published:

Updated: 2026-01-29T16:17:24.194Z

Reserved: 2025-09-30T15:05:03.605Z

Link: CVE-2025-61731

cve-icon Vulnrichment

Updated: 2026-01-29T16:17:20.484Z

cve-icon NVD

Status : Analyzed

Published: 2026-01-28T20:16:10.073

Modified: 2026-02-06T18:43:14.143

Link: CVE-2025-61731

cve-icon Redhat

Severity : Important

Publid Date: 2026-01-28T19:30:30Z

Links: CVE-2025-61731 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-01-29T09:08:43Z

Weaknesses