llamaCVEVulnerability Intelligence
/
Go Toolchain cmd/go

CVE-2026-97039

Go Toolchain cmd/go argument injection via CGO pkg-config directives

A crafted package can inject unchecked compiler and linker flags or load untrusted local .pc files at build time.

Specific setups onlyParche disponibleargument injection
Descargar PNG JSON
CVSS 3.1
8.3
Alta
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L 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 +1
Explotación
Remediación
Monitoreo
Detectada +2
Verificada
11 nov 26
16 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-97039 divulgada · CVSS 8.3 (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, when building a malicious package that uses "#cgo pkg-config:" directives, into loading untrusted pkg-config ".pc" files or injecting unvalidated compiler and linker flags. The flaw stems from weak flag filtering and local ".pc" file handling, which an attacker could use to redirect linker search paths or load local files from the package directory.

Affects the Go toolchain cmd/go before go1.26.11, and from go1.27.0-0 before go1.27.4, when building a package that uses "#cgo pkg-config:" directives. Fixed in go1.26.11 and go1.27.4.

¿Qué significa?A malicious package that uses "#cgo pkg-config:" directives can make the build load untrusted pkg-config .pc files or inject unvalidated compiler and linker flags.
¿Quién está afectado?Go toolchain cmd/go before go1.26.11, and from go1.27.0-0 before go1.27.4. To check a Go installation, run "go version" and compare the reported version with these ranges; the issue concerns builds of packages that use "#cgo pkg-config:" directives.
¿Qué hacer?Upgrade the Go toolchain to go1.26.11 or later in the 1.26 line, or to go1.27.4 or later in the 1.27 line.
Descripción original del registro (Go)

Building a malicious package that uses "#cgo pkg-config:" directives could load untrusted pkg-config ".pc" files or inject unvalidated compiler and linker flags. The pkg-config flag allowlist previously permitted "--with-path=" and "--personality=", allowed "--define-variable=" values beginning with "=" or "$" (which can rewrite paths in system ".pc" files into sysroot-prefixed "-L=" or "-L$SYSROOT" linker search paths), and allowed package arguments ending in ".pc" or containing path separators or "..", which caused pkg-config to load local ".pc" files directly from the package directory. In addition, flags returned by "pkg-config --cflags" in cgoCPPFLAGS were not checked when determining whether internal linking is safe. The go command now disallows "--with-path=", "--personality=", leading "=" or "$" characters in "--define-variable=" values, and local ".pc" paths in "#cgo pkg-config:" directives, and inspects cgoCPPFLAGS when checking internal linking compatibility.

Contexto

Condiciones y alcance

Condiciones necesarias para que el fallo sea explotable
01
Building a malicious package that uses "#cgo pkg-config:" directives“Building a malicious package that uses "#cgo pkg-config:" directives”
02
Go toolchain cmd/go before go1.26.11, or from go1.27.0-0 before go1.27.4“before go1.26.11, from go1.27.0-0 before go1.27.4”
¿Quién debe revisar?Teams building Go programs with cmd/go on Go 1.26 before go1.26.11 or Go 1.27 before go1.27.4, including teams compiling cgo packages from untrusted sources.
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:L
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/862152
Otrahttps://go.dev/issue/82571
Otrahttps://groups.google.com/g/golang-announce/c/iY8TY0wWgbM
Otrahttps://pkg.go.dev/vuln/GO-2026-6852

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