CVE-2026-97043: 
Golang Analyse et atténuation de la vulnérabilité

Aperçu

CVE-2026-97043 is a cgo LDFLAGS validation bypass vulnerability in the Go toolchain (cmd/go and cmd/compile) that allows a malicious package to execute arbitrary code at build time or cause the go command to panic. The flaw stems from a mismatch in how cmd/cgo encodes #cgo LDFLAGS arguments (using strconv.Quote) versus how cmd/compile and cmd/go parse the resulting //go:cgo_ldflag directives (splitting on raw quote characters without handling backslash escapes). Affected versions include cmd/go and cmd/compile prior to Go 1.26.11 and prior to Go 1.27.4 (in the 1.27.x series). The vulnerability was published on November 11, 2026, with patches available in the same release. The CVSS category is estimated as High (GitHub Advisory, Feedly).

Détails techniques

The root cause is an argument injection flaw (CWE-88) arising from a parsing mismatch in the Go toolchain's cgo pipeline. When cmd/cgo generates _cgo_gotypes.go, it encodes each #cgo LDFLAGS argument using strconv.Quote, embedding backslash-escaped quotes in //go:cgo_ldflag directives. However, cmd/compile and cmd/go parsed these directives by naively splitting on raw double-quote characters, without unquoting or handling backslash escapes — allowing crafted quoting sequences to smuggle disallowed linker flags or unvalidated linker search paths past the toolchain's security checks and deliver them directly to the external linker. A secondary bug in processCgoOutputs caused an out-of-bounds slice panic when deduplicating LDFLAGS if a prefix of the flag list matched near the end of the slice. The fix applies strconv.Unquote when parsing //go:cgo_* pragma strings and corrects the slice bounds check (GitHub Advisory, Go Issue).

Impact

A developer or automated build system that builds a malicious Go package using cgo could have arbitrary code executed on their machine at build time — without any runtime deployment of the package being necessary. This makes the vulnerability particularly dangerous in supply chain attack scenarios, where a compromised or malicious dependency could silently compromise developer workstations and CI/CD build infrastructure. Additionally, the out-of-bounds slice panic can be triggered to crash the go command, causing denial of service to build pipelines (GitHub Advisory, Feedly).

Exploitabilité

As of the publication date, there is no public proof-of-concept exploit and no evidence of in-the-wild exploitation (Feedly). The EPSS score is 0.0, indicating a currently low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires an attacker to craft and distribute a malicious Go package that a victim then builds locally — a realistic supply chain attack vector, but one requiring social engineering or repository compromise to deliver the payload.

Étapes d’exploitation

  1. Craft a malicious Go package: Create a Go package that uses cgo and includes a #cgo LDFLAGS directive with carefully crafted backslash-escaped quoting sequences in the C preamble, designed to smuggle disallowed linker flags (e.g., -rpath with an attacker-controlled path, or flags that load a malicious shared library) past the Go toolchain's validation.
  2. Exploit the parsing mismatch: When cmd/cgo processes the package, it encodes the LDFLAGS argument with strconv.Quote. The resulting //go:cgo_ldflag directive contains backslash-escaped quotes that cmd/compile/cmd/go parse incorrectly by splitting on raw quote characters, allowing the smuggled flags to pass validation.
  3. Distribute the package: Publish the malicious package to a public or private Go module proxy/repository, or introduce it as a dependency in a supply chain attack (e.g., typosquatting, dependency confusion, or compromising an existing package).
  4. Trigger victim build: When a developer or CI/CD system runs go build or go get on a project that depends on the malicious package, the smuggled linker flags are passed to the external linker.
  5. Achieve code execution: The external linker processes the attacker-controlled flags, potentially loading a malicious shared library or executing attacker-supplied code at build time on the victim's machine (GitHub Advisory, Go Issue).

Indicateurs de compromis

  • Build Logs: Unexpected or unrecognized linker flags appearing in go build verbose output (-v or -x flags); linker invocations referencing unusual -rpath values or external shared library paths.
  • File System: Unexpected shared libraries (.so, .dylib, .dll) created or loaded from non-standard directories during a Go build; new executables or scripts written to the build cache or temp directories.
  • Process: Unusual child processes spawned by the go or linker process (e.g., shell commands, network utilities) during a go build invocation; go command crashing with an out-of-bounds panic traceback referencing processCgoOutputs.
  • Network: Outbound network connections from the build host to unexpected external IPs initiated during or immediately after a go build operation.
  • Logs: Go build output containing panic stack traces referencing cmd/go internal cgo processing functions, particularly processCgoOutputs (GitHub Advisory).

Atténuation et solutions de contournement

Update the Go toolchain to Go 1.26.11 (for the 1.26.x series) or Go 1.27.4 (for the 1.27.x series), which fix both the quote-parsing mismatch and the out-of-bounds slice panic in processCgoOutputs. As a workaround prior to patching, avoid building Go packages from untrusted or unverified sources, and implement supply chain security controls (e.g., module verification via GONOSUMCHECK, GOFLAGS=-mod=vendor, or dependency pinning with checksums). Organizations using automated build pipelines should audit their Go dependency trees for unexpected cgo-using packages (GitHub Advisory, Go CL).

Réactions de la communauté

The vulnerability was announced via the official golang-announce mailing list and discussed on oss-sec, following standard Go security disclosure practices (golang-announce, oss-sec). No notable independent researcher commentary or significant social media discussion has been identified beyond standard vulnerability tracking and aggregation sites.

Ressources supplémentaires

État de correction de la distribution Linux

Corrigez la disponibilité entre les grandes distributions Linux et leurs versions.

Debian

Affecté

bookworm

golang-1.19

Affecté

sid

golang-1.27: 1.27.4-1

Fixé

trixie

golang-1.24

Affecté

RHEL / CentOS

Affecté

OpenShift

openshift4/ose-operator-sdk-rhel8

Affecté

RHEL 8

Non affecté

RHEL 9

Non affecté

RHEL 10

Non affecté

Source: Ce rapport a été généré à l’aide de l’IA

Connexe Golang Vulnérabilités :

CVE ID

Gravité

Partition

Technologies

Nom du composant

Exploit CISA KEV

A corrigé

Date de publication

CVE-2026-97043NONEN/A
  • Golang logoGolang
  • go-toolset:rhel8::golang-bin
NonOuiNov 11, 2026
CVE-2026-97042NONEN/A
  • Golang logoGolang
  • golang
NonOuiNov 11, 2026
CVE-2026-97041NONEN/A
  • Golang logoGolang
  • go-toolset:rhel8::golang-src
NonOuiNov 11, 2026
CVE-2026-97040NONEN/A
  • Golang logoGolang
  • cpe:2.3:a:golang:go
NonOuiNov 11, 2026
CVE-2026-97039NONEN/A
  • Golang logoGolang
  • go-toolset:rhel8::golang-bin
NonOuiNov 11, 2026

Évaluation gratuite des vulnérabilités

Évaluez votre posture de sécurité cloud

Évaluez vos pratiques de sécurité cloud dans 9 domaines de sécurité afin d’évaluer votre niveau de risque et d’identifier les lacunes dans vos défenses.

Évaluation de la demande

Ressources Wiz supplémentaires

Obtenez une démo personnalisée

Prêt(e) à voir Wiz en action ?

"La meilleure expérience utilisateur que j’ai jamais vue, offre une visibilité totale sur les workloads cloud."
David EstlickRSSI
"Wiz fournit une interface unique pour voir ce qui se passe dans nos environnements cloud."
Adam FletcherChef du service de sécurité
"Nous savons que si Wiz identifie quelque chose comme critique, c’est qu’il l’est réellement."
Greg PoniatowskiResponsable de la gestion des menaces et des vulnérabilités