Unexpected code execution via --sysroot, -target, -isysroot, -Wl,-syslibroot, and -x cgo flags in cmd/go
CVE-2026-97033Published 11 Nov 2026, 03:13 UTC
Real-world risk
6.0/ 10Medium
Schedule in the normal cycle
PreliminaryFrom the CVSS vector only · confidence low
CVSS
8.8
scored by CISA, CVSS 3.1
In plain words
No plain-language summary yet. The original description is below.
Original description (from Go)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| cmd/goNiche | < 1.26.11; >= 1.27.0-0, < 1.27.4 | 1.26.11, 1.27.4 |
What to do
Update to a fixed version: 1.26.11, 1.27.4.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Full compromiseCode execution or full control of the system or application | From the CVSS vector | 1.00 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.7% chance of exploitation in 30 days (percentile 54), as of 2026-12-05.
The arithmetic
- Prerequisites multiplied together0.700
- Threat T1: Nothing known0.850
- 10 × impact 1 × prerequisites 0.7 × threat 0.855.950
- Rounded to one decimal between 0.1 and 106.0
Exploitation and evidence timeline
- 11 Nov 2026 Published
- 3 Dec 2026 Risk 6.0 (cvss fallback)
Weakness
CWE-77