External Control of File Name or Path Affecting std/cmd/go package, versions <1.24.12>=1.25.0 <1.25.6


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.53% (41st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-STDCMDGO-15145704
  • published29 Jan 2026
  • disclosed28 Jan 2026
  • creditRyotaK

Introduced: 28 Jan 2026

CVE-2025-61731  (opens in a new tab)
CWE-73  (opens in a new tab)

How to fix?

Upgrade std/cmd/go to version 1.24.12, 1.25.6 or higher.

Overview

Affected versions of this package are vulnerable to External Control of File Name or Path.

Go Vulnerability Report:

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 Base Scores

version 4.0
version 3.1