Red Hat VEX
RHVEX-CVE-2026-27140
cmd/go: golang: Go (golang) and cmd/go: Arbitrary Code Execution via malicious SWIG file names
Details
A flaw was found in the Go programming language (golang) and its command-line tool (cmd/go). A remote attacker could exploit this during the build process by crafting malicious SWIG (Simplified Wrapper and Interface Generator) file names that contain "cgo" and specific payloads. This could lead to code smuggling and arbitrary code execution, bypassing trust mechanisms and allowing the attacker to run unauthorized code.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Red Hat:enterprise_linux:8 | go-toolset | All versions, no fix yet |
| Red Hat:enterprise_linux:8 | golang | All versions, no fix yet |
| Red Hat:enterprise_linux:8 | golang-bin | All versions, no fix yet |
| Red Hat:enterprise_linux:8 | golang-docs | All versions, no fix yet |
| Red Hat:enterprise_linux:8 | golang-misc | All versions, no fix yet |
| Red Hat:enterprise_linux:8 | golang-race | All versions, no fix yet |
| Red Hat:enterprise_linux:8 | golang-src | All versions, no fix yet |
| Red Hat:enterprise_linux:8 | golang-tests | All versions, no fix yet |
References
- https://access.redhat.com/security/cve/CVE-2026-27140
- https://bugzilla.redhat.com/show_bug.cgi?id=2456341
- https://www.cve.org/CVERecord?id=CVE-2026-27140
- https://nvd.nist.gov/vuln/detail/CVE-2026-27140
- https://go.dev/cl/763768
- https://go.dev/issue/78335
- https://groups.google.com/g/golang-announce/c/0uYbvbPZRWU
- https://pkg.go.dev/vuln/GO-2026-4871