CVE-2025-61731: Go toolchain cmd/go · OS Command Injection
Affects Go toolchain cmd/goSource CVE Database V5
Not known to be exploited · CVSS 7.8 High : upgrade to 1.25.6 or 1.24.12 soon.
Data as of 26 Oct 2026, 06:26 UTC
- EPSS
- 0.6% chance of exploitation in 30 days – higher than 48% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 1.25.6, 1.24.12
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 28 Jan 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.
What to do
Upgrade Go toolchain cmd/go to 1.25.6 or 1.24.12.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Go toolchaincmd/go | Affected
| Fixed in
|
Gocmd/gopkg:golang/cmd/goOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Red Hat has released updated golang packages that fix this vulnerability. Users should apply these security updates as soon as possible. Currently, no effective mitigations meet Red Hat's criteria for ease of use and deployment. Until patched, restricting build permissions and limiting untrusted source builds may reduce risk. Refer to Red Hat advisory RHSA-2026:5943 for update instructions.
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.
References
- go.dev/cl/736711 (opens in a new tab)
- go.dev/issue/77100 (opens in a new tab)
- groups.google.com/g/golang-announce/c/Vd2tYVM8eUc (opens in a new tab)
- pkg.go.dev/vuln/GO-2026-4339 (opens in a new tab)
- access.redhat.com/security/cve/CVE-2025-61731 (opens in a new tab)
- bugzilla.redhat.com/show_bug.cgi?id=2434433 (opens in a new tab)
- security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-61731.json (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:5943 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:5941 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:6949 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:7878 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:7879 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:7876 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:7877 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:7883 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:7833 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:7834 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:5944 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:5942 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:7385 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:7291 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:12282 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:14100 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:21691 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:15091 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:14774 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:20088 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:17598 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:12118 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:8448 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:13736 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:4434 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:3855 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:3559 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:3556 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:5948 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:5950 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:5952 (opens in a new tab)