CVE-2025-61731CWE-88

CVE-2025-61731

High · published January 29, 2026

CVSS v3.1
7.8
EPSS
1%
Percentile
49.0
In the wild
Unconfirmed
What it is

⚡ A carefully crafted Go source file can open a backdoor for attackers to write to their own files! 🎉 Think of it like a restaurant kitchen that blindly accepts any special request from customers without checking the order — one sneaky diner could get their hands on the recipe book! 🍽️ If exploited, an attacker could manipulate the build process to write malicious content wherever they choose, potentially leading to system compromise or data loss. It's like giving someone the keys to your pantry and letting them decide what ingredients to use for their next meal — and you might not like the dish they cook up!

Put simply

Think of it like a restaurant kitchen that blindly accepts any special request from customers without checking the order — one sneaky diner could get their hands on the recipe book! 🍽️ This vulnerability arises from the misuse of the '#cgo pkg-config:' directive in Go, allowing an attacker to specify a '--log-file' argument that points to an attacker-controlled location, leading to unauthorized file writes.

What to do

If exploited, an attacker could manipulate the build process to write malicious content wherever they choose, potentially leading to system compromise or data loss. It's like giving someone the keys to your pantry and letting them decide what ingredients to use for their next meal — and you might not like the dish they cook up! Developers should review their Go source files for the use of '#cgo pkg-config:' directives and ensure they do not accept arbitrary input. Update your codebase and consider using strict validation on any command-line arguments provided. Additionally, monitor your build processes for any unexpected file write operations. 🛡️ You've got this! With a little diligence, you can secure your Go applications and keep those pesky attackers at bay! 🚀

The record
Technical detail
CVSS v3.1
7.8 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00620 · 49.0th percentile
Weakness
CWE-88 · Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
Published
2026-01-29T01:16Z
Affected products (2)
ProductVersionsFixed in
golang/go< 1.24.121.24.12
golang/go≥ 1.25.0, < 1.25.61.25.6
References (38)
https://go.dev/cl/736711 · [email protected]https://go.dev/issue/77100 · [email protected]https://groups.google.com/g/golang-announce/c/Vd2tYVM8eUc · [email protected]https://pkg.go.dev/vuln/GO-2026-4339 · [email protected]https://access.redhat.com/errata/RHSA-2026:12118 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:12282 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:13736 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:14100 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:14774 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:15091 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:17598 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:20088 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:21691 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:3556 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:3559 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:3855 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:4434 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:5941 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:5942 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:5943 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:5944 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:5948 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:5950 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:5952 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:6949 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:7291 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:7385 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:7833 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:7834 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:7876 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:7877 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:7878 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:7879 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:7883 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/errata/RHSA-2026:8448 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://access.redhat.com/security/cve/CVE-2025-61731 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://bugzilla.redhat.com/show_bug.cgi?id=2434433 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46chttps://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-61731.json · 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
EPSS history
Timeline
  • 28 JAN 19:30Z
    Arbitrary file write using cgo pkg-config directive in cmd/go
    cvelistv5