CVE-2026-97033
Go Toolchain cmd/go code execution via crafted cgo compiler flags
An attacker can run arbitrary code on a build machine by getting a crafted cgo package built.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Fuente: CISA-ADP
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | CVE-2026-97033 divulgada · CVSS 8.8 (CISA-ADP) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Fuente: OSV | Registro visto por primera vez en OSV | |
| Monitoreo | Fuente: NIST NVD | Registro visto por primera vez en NIST NVD | |
| Divulgación | Evaluación SSVC | CISA-ADP · explotación ninguna | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Building a malicious package that uses cgo can lead to arbitrary code execution on the build machine in the Go toolchain (cmd/go), through certain compiler and linker flags allowed in #cgo directives. Exploiting it requires a crafted package to be built, and the flags are now blocked or restricted.
Descripción original del registro (Go)
Building a malicious package that uses cgo could cause arbitrary code execution at build time through several compiler and linker flags permitted in "#cgo" directives. Specifically, "--sysroot" in GCC and Clang relocates compiler subprograms, spec files, and CRT startup objects to an attacker-controlled directory; "-target" in Clang falls back to executing target helper tools from the current working directory when not found in PATH; "-isysroot" and "-Wl,-syslibroot" can pass a regular file on disk to GNU ld.bfd, which interprets it as a positional linker script; and "-x" permitted specifying arbitrary compiler input languages beyond those supported by cgo. "--sysroot" and "-target" are now disallowed in "#cgo" flags, "-isysroot" and "-Wl,-syslibroot" are verified not to point to regular files, and "-x" is restricted to the C, C++, Objective-C, and assembler languages supported by cgo.
Condiciones y alcance
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
cmd/go |
Corregida | 1.26.11, 1.27.4 | — | — |
1.26.111.27.4Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://go.dev/cl/862146https://go.dev/issue/82577https://groups.google.com/g/golang-announce/c/iY8TY0wWgbMhttps://pkg.go.dev/vuln/GO-2026-6858Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
