Quick answers
- Is CVE-2025-61731 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2025-61731 being exploited in the wild.
- How severe is CVE-2025-61731?
- High severity, with a CVSS score of 7.8, published 28 January 2026.
- Which products and versions are affected?
- toolchain (Go) SEMVER:introduced=0,fixed=1.24.12,introduced=1.25.0,fixed=1.25.6.
- Is there a fix for CVE-2025-61731?
- Yes. toolchain (Go): upgrade to 1.25.6 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2025-61731 attacked?
- It is attacked with local access, in a software library.
- Am I affected by CVE-2025-61731?
- Check whether you run toolchain (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- toolchain (Go): upgrade to 1.25.6 or later
go get toolchain@v1.25.6
Technical details
A vulnerability exists in the 'cmd/go' component of the Go standard library due to insufficient sanitization of flags in the '#cgo pkg-config:' directive. An attacker can bypass flag sanitization by providing a '--log-file' argument within a Go source file, which is then passed to the pkg-config binary. This allows the attacker to trigger a write to an arbitrary file path with partial control over the content. While the primary impact is an unauthorized file write, the Go project notes this can lead to arbitrary code execution. The issue is tracked as CVE-2025-61731 and is fixed in Go versions 1.24.12 and 1.25.6.
Affected products
- Google Go before 1.24.12, 1.25.0 to 1.25.5
Identifiers
- CVE-2025-61731
- GO-2026-4339
Timeline
- 2026-01-07: disclosed: Issue opened on Go GitHub repository
- 2026-01-28: advisory: Official Go security advisory published