llamaCVEVulnerability Intelligence
/
Go Toolchain cmd/go

CVE-2026-97035

Go Toolchain cmd/go arbitrary code execution and file write in cgo

An attacker can run code at build time or write files to arbitrary directories using a malicious cgo package.

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-97035 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

The Go command (cmd/go) can be tricked into unexpected code execution at build time or into writing files to arbitrary directories when it builds a malicious package that uses cgo with Clang or GCC. The flaw came from "-gen-*" and "-gnat*" flags in "#cgo" directives being allowed through, and those flags are now disallowed.

¿Qué significa?A malicious package that uses cgo can, when built with Clang or GCC as the C compiler, cause unexpected code execution at build time or write files to arbitrary directories.
¿Quién está afectado?Go toolchain cmd/go versions before 1.26.11, and versions from 1.27.0-0 before 1.27.4. The condition is building with Clang or GCC as the C compiler; to check, run go version to see the toolchain version.
¿Qué hacer?Upgrade to Go 1.26.11 or Go 1.27.4, which are the fixed versions.
Descripción original del registro (Go)

When using Clang or GCC, building a malicious package that uses cgo could cause unexpected code execution at build time or write files to arbitrary directories via "-gen-*" or "-gnat*" flags in "#cgo" directives. The "-g*" wildcard in the compiler and linker flag allowlists previously matched Clang's two-argument "-gen-cdb-fragment-path <dir>" flag and GCC's two-argument "-gnatO <file>" flag, permitting compilation database fragments and sidecar output files to be written to arbitrary directories and desynchronizing flag argument parsing between the go command and the compiler driver so that subsequent arguments could be passed as unvalidated positional inputs to the linker. "-gen-*" and "-gnat*" flags are now disallowed in "#cgo" compiler and linker flags.

Contexto

Condiciones y alcance

Condiciones necesarias para que el fallo sea explotable
01
Building with Clang or GCC as the C compiler“When using Clang or GCC, building a malicious package that uses cgo”
¿Quién debe revisar?Teams building Go programs with cgo using Clang or GCC on Go toolchains before go1.26.11, or from go1.27.0-0 before go1.27.4.
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/862148
Otrahttps://go.dev/issue/82575
Otrahttps://groups.google.com/g/golang-announce/c/iY8TY0wWgbM
Otrahttps://pkg.go.dev/vuln/GO-2026-6856

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