Red Hat VEX
RHVEX-CVE-2025-61732
cmd/cgo: Go cgo: Code smuggling due to comment parsing discrepancy
Details
A flaw was found in Go's 'cgo tool'. This vulnerability arises from a discrepancy in how Go and C/C++ comments are parsed, which allows for malicious code to be hidden within comments and then "smuggled" into the compiled cgo binary. An attacker could exploit this to embed and execute arbitrary code, potentially leading to significant system compromise.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Red Hat:enterprise_linux:9 | go-toolset | All versions, no fix yet |
References
- https://access.redhat.com/security/cve/CVE-2025-61732
- https://bugzilla.redhat.com/show_bug.cgi?id=2437016
- https://www.cve.org/CVERecord?id=CVE-2025-61732
- https://nvd.nist.gov/vuln/detail/CVE-2025-61732
- https://go.dev/cl/734220
- https://go.dev/issue/76697
- https://groups.google.com/g/golang-announce/c/K09ubi9FQFk
- https://pkg.go.dev/vuln/GO-2026-4433