Security Resilience

CVE-2025-61731

Golang Go ≤ 1.24.12

Published
28 January 2026
Modified
10 September 2026
Patch / advisory
CVSS Score v3.1 7.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0059 49th percentile
Risk Priority 58 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2025-61731 is a high-severity Argument Injection (CWE-88) vulnerability in Golang Go. Its CVSS base score is 7.8 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked at the 49th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2025-61731 affects the cmd/go tool in the Go programming language. The vulnerability arises when building a Go source file that includes a malicious "#cgo pkg-config:" directive. This directive passes command-line arguments to the pkg-config command, and an attacker can include a "--log-file" argument to direct pkg-config to write log data to an attacker-controlled file location, granting partial control over the written content.

A local attacker with low privileges can exploit this issue by tricking a user into building a malicious Go source file. Exploitation requires local access and low complexity with no user interaction needed. Successful attacks enable arbitrary file writes, resulting in high impacts to confidentiality, integrity, and availability, as reflected in the CVSS v3.1 base score of 7.8 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Go advisories detail mitigations and patches, including the fix in change list https://go.dev/cl/736711, issue discussion at https://go.dev/issue/77100, announcement at https://groups.google.com/g/golang-announce/c/Vd2tYVM8eUc, and vulnerability entry at https://pkg.go.dev/vuln/GO-2026-4339.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

pkg-config command. An attacker can provide a "--log-file" argument to this directive, causing pkg-config to write to an attacker-controlled location.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1083 File and Directory Discovery Discovery
Adversaries may enumerate files and directories or may search in specific locations of a host or network share for certain information within a file system.
T1105 Ingress Tool Transfer Command And Control
Adversaries may transfer tools or other files from an external system into a compromised environment.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1212 Exploitation for Credential Access Credential Access
Adversaries may exploit software vulnerabilities in an attempt to collect credentials.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-33811Same product: Golang Go
CVE-2023-24537Same product: Golang Go
CVE-2026-27144Same product: Golang Go
CVE-2025-61732Same product: Golang Go
CVE-2023-29400Same product: Golang Go
CVE-2023-39320Same product: Golang Go
CVE-2023-24538Same product: Golang Go
CVE-2023-24539Same product: Golang Go
CVE-2026-39836Same product: Golang Go
CVE-2025-68119Same product: Golang Go

Affected Assets

golang
go
≤ 1.24.12 · 1.25.0 — 1.25.6

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

—

Detect
Catch it (NIST detect / respond)

—

Harden
Shrink the surface (DISA STIG)

—

Validate
Prove the fix (OWASP ASVS)
  • V1.2.5

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

Developer testing can discover argument-injection flaws in command-construction code but does not stop their introduction.

Input validation directly stops construction of command strings containing unneutralized delimiters or injected arguments.

Mitigating Controls (NIST CSF 2.0)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

PR.PS-06 mostly match
blocks

Secure SDLC practices directly require proper input validation and command construction to prevent argument injection.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

Security testing can detect argument injection but does not prevent it at the source.

prevents

Training developers about secure command construction and argument handling reduces argument injection instances, but the practice is fallible and most such flaws still slip through, matching the same partial rung A.6.3 and A.8.28 hold on other developer-introduced injection flaws.

prevents

Secure coding standards explicitly require proper neutralization of command arguments, directly eliminating CWE-88.

prevents

A.8.30 carries its effect through the secure-development practices (8.25-8.29) its contract requires of the supplier, and argument injection is an ordinary software implementation weakness those practices address; the clause sits at its declared ceiling of `partial` because the underlying practices are fallible and the clause depends on them being implemented by the supplier.

finds

A.8.8's reach is DISCLOSURE — it identifies vulnerabilities through published advisories, vendor notifications, and scanning against known CVE feeds. CWE-88 does surface as CVEs in third-party components (PHPMailer, browsers, mail clients, etc., per the observed examples), so a minority of instances are findable. The bulk of argument injection lives in custom first-party code with no published advisory, which A.8.8's disclosure-based programme does not reach — same scope seam as A.8.8 -> CWE-89.

References