CVE Tools

CVE-2025-61731

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

Published: Jan 28, 2026Updated: Feb 6, 2026 Sources: CVE List NVD BDUNVD-CWE-noinfo

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 Vector Breakdown

AV:LAC:LPR:LUI:NS:UC:HI:HA:H
Exploitability
AV:LAttack Vector
Local
AC:LAttack Complexity
Low
PR:LPrivileges Required
Low
UI:NUser Interaction
None
Scope
S:UScope
Unchanged
Impact
C:HConfidentiality
High
I:HIntegrity
High
A:HAvailability
High

Weaknesses

Affected Products

the go projectoss-projectOSS Librariesaka go, golang-google-protobuf, crypto
go toolchainoss-projectUSOSS Librariesaka golang, go compiler toolchain, cmd/go
golangoss-projectUSOSS Libraries

Exploitability

Official Patch Available

References

and 7 more references View all →

Timeline

Published
Jan 28, 2026
Last Updated
Feb 6, 2026

Unlock Complete Vulnerability Intelligence

Get the full picture for CVE-2025-61731 and every CVE in our database. Create a free account — no credit card required.

Create Free Account
Plain-language analysis
Impact assessment and exploitation scenario in plain English
Attack graph visualization
Interactive attack path and kill chain mapping
Exploit details & PoC links
ExploitDB, Metasploit, GitHub PoCs with direct links
Nuclei scanner templates
Ready-to-use vulnerability scanner templates
Full remediation guide
Patch instructions, workarounds, and compliance impact
Interactive AI chat
Ask questions about this vulnerability in natural language
Related vulnerabilities
Semantically similar CVEs and attack patterns
REST API & MCP access
Integrate vulnerability data into your workflows