CVE-2026-97037
Go Toolchain cmd/go arbitrary code execution in CGO linker flags
An attacker can run arbitrary code by supplying a malicious package that uses cgo when it is linked.
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-97037 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 |
The Go toolchain's cmd/go tool is affected by a flaw in how it handles cgo linker flags, which can let a malicious package that uses cgo run arbitrary code when it is linked. Because the bug lies in how linker flags are passed to the host linker, the exact way an attacker reaches it depends on the build path, and no CVSS vector or advisory impact is provided to narrow that down further.
Affects the Go toolchain's cmd/go before 1.26.11, and 1.27.0 before 1.27.4, when cgo builds use #cgo LDFLAGS with GNU ld.bfd. Fixed in 1.26.11 and 1.27.4.
Descripción original del registro (Go)
Building a malicious package that uses cgo could cause arbitrary code execution at link time by passing linker script files to the host linker via "#cgo LDFLAGS". Split "-Wl," flags that consume a following argument (such as "-Wl,-rpath", "-Wl,--just-symbols", and "-Wl,-undefined") previously accepted a bare second argument without a "-Wl," prefix, which the compiler driver passes directly to the linker as a positional input file. Additionally, when using GNU ld.bfd, flags such as "-framework", "-Wl,-framework", "-Wl,-undefined", "-Wl,--just-symbols", "-Wl,-R", "-Wl,-subsystem", and (on non-Darwin platforms) "-Wl,-sectcreate" could cause ld.bfd to interpret their arguments as linker scripts if they named a regular file on disk. The go command now requires a "-Wl," prefix on the second token of split "-Wl," flags (except "-Wl,-R"), verifies that these flags do not reference linker script files, and disallows bare "-Wl,--warn-backrefs-exclude".
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/862150https://go.dev/issue/82573https://groups.google.com/g/golang-announce/c/iY8TY0wWgbMhttps://pkg.go.dev/vuln/GO-2026-6854Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
