CVE-2025-61732 Potential code smuggling via doc comments in cmd/cgo
Attackers can smuggle malicious code into cgo binaries via doc comments, potentially leading to code execution during compilation.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2025-61732?
CVE-2025-61732 is a high-severity code injection vulnerability in Golang Go, published on 5 Feb 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
A discrepancy between how Go and C/C++ comments were parsed allowed for code smuggling into the resulting cgo binary.
Weakness: CWE-94
Which versions are affected by CVE-2025-61732?
2 open source packages ship an affected version, including golang and toolchain. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
golang Bitnami | All versions | 1.24.13, 1.25.7 |
toolchain Go | All versions | 1.24.13, 1.25.7 |
Linux distribution packages (2)
go1.24 openSUSE:Tumbleweed | All versions | 1.24.13-1.1 |
go1.25 openSUSE:Tumbleweed | All versions | 1.25.7-1.1 |
Products include Golang Go.
How do I fix CVE-2025-61732?
Upgrade golang to a fixed version for your release line: 1.24.13 or 1.25.7.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2025-61732 being exploited?
There is no known exploitation of CVE-2025-61732 in the wild and no public exploit code.
Other vulnerabilities in Golang Go
- CVE-2020-0601 Microsoft Windows CryptoAPI Spoofing
- CVE-2026-27143 Missing bound checks can lead to memory corruption in safe Go in cmd/compile
- CVE-2024-24790 Unexpected behavior from Is methods for IPv4-mapped IPv6 addresses in net/netip
- CVE-2023-39320 Arbitrary code execution via go.mod toolchain directive in cmd/go
- CVE-2023-24540 Improper handling of JavaScript whitespace in html/template
Sources
Also known as AZL-76688, AZL-76743, AZL-78937, AZL-98736, BELL-CVE-2025-61732, BIT-golang-2025-61732 and 469 more.