CVE-2026-97033

HighCVSS 8.8/10Last modified Nov 17, 2026

Description

Building a malicious package that uses cgo could cause arbitrary code execution at build time through several compiler and linker flags permitted in "#cgo" directives. Specifically, "--sysroot" in GCC and Clang relocates compiler subprograms, spec files, and CRT startup objects to an attacker-controlled directory; "-target" in Clang falls back to executing target helper tools from the current working directory when not found in PATH; "-isysroot" and "-Wl,-syslibroot" can pass a regular file on disk to GNU ld.bfd, which interprets it as a positional linker script; and "-x" permitted specifying arbitrary compiler input languages beyond those supported by cgo. "--sysroot" and "-target" are now disallowed in "#cgo" flags, "-isysroot" and "-Wl,-syslibroot" are verified not to point to regular files, and "-x" is restricted to the C, C++, Objective-C, and assembler languages supported by cgo.

Metrics

CVSS 3.1 8.8/10CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Weakness enumeration

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Nov 11, 2026
Last modified
Nov 17, 2026
NVD status
Awaiting Analysis

Related CVEs from 2026

CVE-2026-970348.8When using GCC, building a malicious package that uses cgo could cause arbitrary command execution at link time via untrusted GCC spec filesCVE-2026-970358.8When using Clang or GCC, building a malicious package that uses cgo could cause unexpected code execution at build time or write files to arCVE-2026-970368.8On Darwin, building a malicious package that uses cgo could cause arbitrary code execution when using the Apple linker due to passing "-l toCVE-2026-970378.8Building a malicious package that uses cgo could cause arbitrary code execution at link time by passing linker script files to the host linkCVE-2026-970388.8Building a malicious package containing ".syso" files or cgo linker inputs could inject arbitrary linker flags or execute arbitrary code at CVE-2026-970398.3Building a malicious package that uses "#cgo pkg-config:" directives could load untrusted pkg-config ".pc" files or inject unvalidated compiCVE-2026-97048.8A flaw was found in Keycloak. An authenticated user with low privileges can exploit this vulnerability by sending an oversized subject_tokenCVE-2026-970409.8Building a package containing a crafted ".syso" file could bypass cgo flag validation and inject arbitrary linker flags when linking. When lCVE-2026-970418.8Building a malicious package containing "//go:cgo_*" compiler directives could inject arbitrary flags into the external linker invocation onCVE-2026-970428.8Building a malicious package that uses "//go:cgo_import_dynamic" or links against a crafted PE object on Windows could pass unsafe library aCVE-2026-970438.8Building a malicious package that uses cgo could bypass "#cgo LDFLAGS" validation and cause unexpected code execution at build time, or causCVE-2026-970456.1In childTextNodesAreLiteral, walking up the tree previously stopped at the nearest foreign ancestor once an HTML integration point was found
CVE-2026-97033: High severity, CVSS 8.8 | Vulnix