- CVE-2026-97033: cmd/go - disallow --sysroot and -target in cgo flags,
reject -isysroot and -Wl,-syslibroot naming a regular file, and restrict
-x to the languages cgo supports, preventing code execution at build time
- CVE-2026-97034: cmd/go - reject GCC spec files (specs, *.spec) in -L,
-isysroot and -Wl,-syslibroot directories, and in the working and package
directories when -fopenmp, -fopenacc or -fsanitize with -static or
-static-lib* is passed, and reject -fsanitize= values starting with @ or -,
preventing an untrusted spec file from running code at build time
- CVE-2026-97035: cmd/go - disallow Clang -gen-* and GCC -gnat* flags in cgo
compiler and linker flags, which matched the -g* allowlist wildcard but
take a separate argument, so they can no longer write sidecar files or
pass a following linker script to the linker as a positional input,
preventing code execution at build time
- CVE-2026-97036: cmd/go - disallow "-l to_library" and the -lazy_library,
-lazy_framework, -load_hidden, -library and -library-path linker flags in
cgo LDFLAGS, and check recombined -l arguments against disallowed flags,
preventing an arbitrary LTO plugin or linker script from being loaded
- CVE-2026-97037: cmd/go - require a -Wl, prefix on the second token of split
-Wl, flags and reject linker script files passed through -framework,
-Wl,-framework, -Wl,-undefined, -Wl,--just-symbols, -Wl,-R, -Wl,-subsystem
and -Wl,-sectcreate, preventing code execution at link time
- CVE-2026-97038: cmd/go - check .syso files, direct linker inputs and
libraries in -L directories for GNU ld implicit linker scripts, COFF
.drectve directives, Mach-O LC_LINKER_OPTION commands and LTO IR sections,
and disallow -l:
and :, = or path separators in -l names, preventing
code execution at link time
- CVE-2026-97039: cmd/go - remove --with-path= and --personality= from the
pkg-config flag allowlist, disallow a leading = or $ in --define-variable=
values, reject .pc files and paths as pkg-config package names, and check
CGO_CPPFLAGS for flags not compatible with internal linking
- CVE-2026-97040: cmd/go, cmd/link - reject .syso files that are Go objects
or have an unrecognized format, preventing unchecked cgo directives from
being injected through them, and keep the .syso suffix when long archive
member names are truncated
- CVE-2026-97041: cmd/compile, cmd/link - reject commas in symbol names and
paths of the cgo_import_dynamic, cgo_export_dynamic, cgo_export_static,
cgo_import_static and cgo_dynamic_linker directives and pass the dynamic
linker as -Wl,--dynamic-linker=, so they can no longer inject host
linker flags, and stop cgo_import_dynamic from overwriting the external
name of a symbol that is already exported through cgo
- CVE-2026-97042: cmd/cgo, cmd/compile, cmd/link - validate every character
of cgo_import_dynamic library names and reject ".." path traversal, also
in cgo-generated files for Windows, and reject PE imported DLL names with
path separators, "..", ":" or a leading "-" or "@"
- CVE-2026-97043: cmd/go, cmd/compile - unquote //go:cgo_ldflag,
//go:cgo_dynamic_linker and //go:cgo_import_dynamic strings with
strconv.Unquote and handle escaped quotes in pragma fields, so quoted
linker flags can no longer bypass checkLinkerFlags, and bound the cgo
LDFLAGS removal loop to prevent an out-of-range panic
- Build the race detector .syso files without LTO flags, because the
CVE-2026-97038 check rejects .syso files with LLVM LTO sections