CVE-2026-97041
Go cmd/compile linker flag injection via CGO directives in the toolchain
An attacker can supply a malicious package that makes the build pass arbitrary flags to the external linker.
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-97041 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 compiler and linker (cmd/compile and cmd/link) on ELF platforms can be tricked into passing arbitrary flags to the external host linker when building a malicious package that contains "//go:cgo_*" directives. Commas or a leading "@" in symbol or dynamic linker names let an attacker split those values into extra linker flags or response file arguments.
Descripción original del registro (Go)
Building a malicious package containing "//go:cgo_*" compiler directives could inject arbitrary flags into the external linker invocation on ELF platforms. The compiler and linker did not reject commas in "//go:cgo_import_dynamic", "//go:cgo_export_dynamic", "//go:cgo_export_static", "//go:cgo_import_static", and "//go:cgo_dynamic_linker" directives, and the linker passed the dynamic linker path using "-Wl,--dynamic-linker,<path>". Furthermore, the two-argument form of "//go:cgo_import_dynamic" (which is permitted in non-cgo Go source files) could overwrite the external symbol name of a symbol already marked for cgo export. A symbol name or dynamic linker path containing a comma or leading "@" could split "-Wl,--export-dynamic-symbol=" or "-Wl,--dynamic-linker," into arbitrary host linker flags or response file arguments. The compiler and linker now reject commas in "//go:cgo_*" symbol and dynamic linker directives, the linker passes "-Wl,--dynamic-linker=<path>", and "cgo_import_dynamic" no longer overwrites symbols exported via "cgo_export_dynamic" or "cgo_export_static".
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/compile |
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/862154https://go.dev/issue/82569https://groups.google.com/g/golang-announce/c/iY8TY0wWgbMhttps://pkg.go.dev/vuln/GO-2026-6850Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
