Description
There are packages installed that are affected by multiple vulnerabilities referenced in the following CVEs:
- 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. (CVE-2026-97033)
- When using GCC, building a malicious package that uses cgo could cause arbitrary command execution at link
time via untrusted GCC spec files ("specs" or "*.spec"). When linking with "-fopenmp", "-fopenacc", or
"-fsanitize=" in "#cgo LDFLAGS", GCC's built-in link spec evaluates "%:include(libgomp.spec)" or
"%:include(libsanitizer.spec)" and searches for spec files in "-L" and sysroot directories (including
subdirectories and multilib sibling directories such as "../lib64"), as well as the working directory when
"-fopenmp" or "-fopenacc" is used or when "-fsanitize=" is combined with "-static" or "-static-lib*". The
go command now rejects "-L", "-isysroot", and "-Wl,-syslibroot" directories (and the working and package
directories when applicable) that contain GCC spec files, and disallows "@" and "-" prefixes in
"-fsanitize=" compiler flag values. (CVE-2026-97034)
- When using Clang or GCC, building a malicious package that uses cgo could cause unexpected code execution
at build time or write files to arbitrary directories via "-gen-*" or "-gnat*" flags in "#cgo" directives.
The "-g*" wildcard in the compiler and linker flag allowlists previously matched Clang's two-argument
"-gen-cdb-fragment-path <dir>" flag and GCC's two-argument "-gnatO <file>" flag, permitting compilation
database fragments and sidecar output files to be written to arbitrary directories and desynchronizing
flag argument parsing between the go command and the compiler driver so that subsequent arguments could be
passed as unvalidated positional inputs to the linker. "-gen-*" and "-gnat*" flags are now disallowed in
"#cgo" compiler and linker flags. (CVE-2026-97035)
- Building a malicious package that uses cgo could cause arbitrary code execution at link time by passing
linker script files to the host linker via "#cgo LDFLAGS". Split "-Wl," flags that consume a following
argument (such as "-Wl,-rpath", "-Wl,--just-symbols", and "-Wl,-undefined") previously accepted a bare
second argument without a "-Wl," prefix, which the compiler driver passes directly to the linker as a
positional input file. Additionally, when using GNU ld.bfd, flags such as "-framework", "-Wl,-framework",
"-Wl,-undefined", "-Wl,--just-symbols", "-Wl,-R", "-Wl,-subsystem", and (on non-Darwin platforms)
"-Wl,-sectcreate" could cause ld.bfd to interpret their arguments as linker scripts if they named a
regular file on disk. The go command now requires a "-Wl," prefix on the second token of split "-Wl,"
flags (except "-Wl,-R"), verifies that these flags do not reference linker script files, and disallows
bare "-Wl,--warn-backrefs-exclude". (CVE-2026-97037)
Solution
Update the go library and its related packages to version 1.26.11-r0 or later.
Plugin Details
Supported Sensors: Agentless Assessment
Risk Information
Vector: CVSS2#AV:L/AC:M/Au:N/C:P/I:P/A:P
Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Temporal Vector: CVSS:3.0/E:U/RL:O/RC:C
Vulnerability Information
Exploit Ease: No known exploits are available
Vulnerability Publication Date: 11/11/2026
Reference Information
CVE: CVE-2026-97033, CVE-2026-97034, CVE-2026-97035, CVE-2026-97037, CVE-2026-97038, CVE-2026-97039, CVE-2026-97040, CVE-2026-97041, CVE-2026-97042, CVE-2026-97043, CVE-2026-97054