llamaCVEVulnerability Intelligence
/
Go Toolchain cmd/go

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.

Specific setups onlyParche disponibleargument injection
Descargar PNG JSON
CVSS 3.1
8.8
Alta
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Fuente: CISA-ADP
ExplotaciónSin evidenciaSSVC: none · no figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versiones1.26.11 · 1.27.4
Exposición8 dDesde la divulgación, 10 nov 2026, 10:13 p. m.
Detección7 minDesde la divulgación hasta su ingreso al índice
Decisión SSVCSeguir de cerca
Monitorear y programar la remediación
Sin explotación conocida, no automatizable e impacto técnico total. Hay versiones corregidas disponibles.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Evaluación SSVC
Modificada
Explotación
Remediación
Monitoreo
Detectada +2
Verificada
11 nov 26
16 nov 26
17 nov 26
19 nov 26
11 nov 26
13 nov 26
15 nov 26
17 nov 26
19 nov 26
FechaFaseEventoDetalle
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
Resumen
Resumen generado por IA · CC-BY 4.0 · 10 nov 2026

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.

¿Qué significa?Building a malicious package that uses cgo on macOS with the Apple linker can run arbitrary code at link time. The build loads an arbitrary LTO plugin dynamic library because of a "-l to_library <path>" argument in a #cgo LDFLAGS directive.
¿Quién está afectado?Go cmd/go and toolchain versions before 1.26.11, and from 1.27.0 before 1.27.4, are affected. The issue needs a build on Darwin with the Apple linker and a package whose #cgo LDFLAGS directive passes "-l to_library <path>". To check, run go version and search the package's #cgo LDFLAGS lines for to_library.
¿Qué hacer?Upgrade the Go toolchain to 1.26.11 on the 1.26 line or to 1.27.4 on the 1.27 line.
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.

Contexto

Condiciones y alcance

Condiciones necesarias para que el fallo sea explotable
01
Building on Darwin (macOS) with the Apple linker“On Darwin, building a malicious package that uses cgo could cause arbitrary code execution when using the Apple linker”
02
Package has a cgo '#cgo LDFLAGS' directive passing "-l to_library <path>"“due to passing "-l to_library <path>" in a "#cgo LDFLAGS" directive”
¿Quién debe revisar?Teams building Go code with cgo on macOS (Darwin) using the Apple linker, including anyone compiling untrusted Go packages
Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · CISA-ADP
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida
cmd/go · toolchain< 1.26.11
cmd/go · toolchain≥ 1.27.0-0 < 1.27.4
1.26.11
1.27.0-0
1.27.4
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
cmd/go
Corregida 1.26.11, 1.27.4 — —
Versiones corregidas1.26.111.27.4
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Otrahttps://go.dev/cl/862149
Otrahttps://go.dev/issue/82574
Otrahttps://groups.google.com/g/golang-announce/c/iY8TY0wWgbM
Otrahttps://pkg.go.dev/vuln/GO-2026-6855

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.