CVE-2026-97036
Go Toolchain cmd/go arbitrary code execution via cgo LDFLAGS on Darwin
A crafted cgo package can run arbitrary code during a build on macOS by making the linker load a malicious library.
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-97036 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 |
On Darwin systems using the Apple linker, building a malicious Go package that uses cgo can run arbitrary code during the build, because a crafted "#cgo LDFLAGS" directive makes the linker load an attacker-chosen dynamic library. The fix has the go command reject that flag pattern and other risky linker flags.
Only affects Go cmd/go and toolchain builds on macOS with the Apple linker when a package has a cgo LDFLAGS directive passing "-l to_library <path>". Fixed in 1.26.11 and 1.27.4.
Descripción original del registro (Go)
On Darwin, building a malicious package that uses cgo could cause arbitrary code execution when using the Apple linker due to passing "-l to_library <path>" in a "#cgo LDFLAGS" directive. The Apple linker recombines the separated arguments "-l" and "to_library" into "-lto_library", which loads an arbitrary LTO plugin dynamic library at link time. The go command now disallows "-l" followed by "to_library" in "#cgo LDFLAGS", rejects "-lazy_library", "-lazy_framework", "-load_hidden", "-library", and "-library-path", and checks recombined "-l" arguments against disallowed linker flags and patterns.
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/862149https://go.dev/issue/82574https://groups.google.com/g/golang-announce/c/iY8TY0wWgbMhttps://pkg.go.dev/vuln/GO-2026-6855Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
