llamaCVEVulnerability Intelligence
/
Go Toolchain cmd/go

CVE-2026-97043

Go Toolchain cmd/go build-time code execution via CGO linker flag injection

A malicious CGO package can smuggle disallowed linker flags past validation to run code at build time.

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-97043 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 toolchain's cmd/go and cmd/compile tools mishandle escaped quotes in cgo linker directives, which can let a malicious package that uses cgo smuggle disallowed linker flags past validation and run unexpected code at build time, or make the go command panic. The flaw is also triggered by a malformed LDFLAGS list during deduplication in cmd/go.

Affects Go toolchain cmd/go and cmd/compile before go1.26.11, and from go1.27.0-0 before go1.27.4, when building a malicious package that uses cgo. Fixed in go1.26.11 and go1.27.4.

¿Qué significa?Escaped quotes in a //go:cgo_ldflag directive can let disallowed linker flags or unvalidated linker search paths reach the external linker. The result is unexpected code execution at build time, or a panic in the go command.
¿Quién está afectado?Affected are cmd/go and cmd/compile before go1.26.11, and from go1.27.0-0 before go1.27.4. Run go version to see the toolchain version, and note that the issue arises when a package that uses cgo is built.
¿Qué hacer?Upgrade the Go toolchain to go1.26.11 or later on the 1.26 line, or to go1.27.4 or later on the 1.27 line.
Descripción original del registro (Go)

Building a malicious package that uses cgo could bypass "#cgo LDFLAGS" validation and cause unexpected code execution at build time, or cause the go command to panic, via crafted quoting in "//go:cgo_ldflag" directives. When "cmd/cgo" generates "_cgo_gotypes.go", it quotes each "#cgo LDFLAGS" argument with strconv.Quote in a "//go:cgo_ldflag" directive, but "cmd/compile" and "cmd/go" parsed those directives by splitting on raw quote characters without handling backslash escapes or unquoting the string. This mismatch allowed disallowed linker flags or unvalidated linker search paths to be smuggled past the go command's flag checks and passed to the external linker. In addition, deduplicating LDFLAGS in the go command could panic with an out-of-bounds slice index when a prefix of the flag list matched near the end of the slice. "cmd/compile" and "cmd/go" now properly handle backslash-escaped quotes and unquote "//go:cgo_*" pragma strings with strconv.Unquote, and the slice bounds check in processCgoOutputs has been fixed.

Contexto

Condiciones y alcance

Condiciones necesarias para que el fallo sea explotable
01
Affected Go toolchain versions: cmd/go and cmd/compile before go1.26.11, and from go1.27.0-0 before go1.27.4.“before go1.26.11, from go1.27.0-0 before go1.27.4”
02
A malicious package that uses cgo is built.“Building a malicious package that uses cgo”
¿Quién debe revisar?Teams building Go programs with cgo on the Go toolchain (cmd/go, cmd/compile) at affected versions, including those building third-party packages that use cgo.
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 · cmd/compile · toolchain< 1.26.11
cmd/go · cmd/compile · 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/862156
Otrahttps://go.dev/issue/82567
Otrahttps://groups.google.com/g/golang-announce/c/iY8TY0wWgbM
Otrahttps://pkg.go.dev/vuln/GO-2026-6848

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