CVE-2026-97038
Arbitrary code execution via crafted .syso files and cgo linker input files in cmd/go
- Severity
- high CVSS 8.8 (v3.1)
- Affects
- cmd/go · Go toolchain
- Weakness
- CWE-94 Improper Control of Generation of Code ('Code Injection')
- Published
- 11 November 2026 by Go
- First seen on our lists
- 5 November 2026
Building a malicious package containing ".syso" files or cgo linker inputs could inject arbitrary linker flags or execute arbitrary code at link time. Linker input files—including ".syso" files, direct object or library inputs in "#cgo LDFLAGS", and libraries in "-L" directories—were passed to the external linker without validating their format or checking for embedded linker options. Across platforms, this allowed executing GNU ld implicit linker scripts disguised as libraries or ".syso" files (or loaded via "-l:<filename>" or "-l" containing path separators), injecting unallowlisted linker flags via PE/COFF ".drectve" sections on Windows or Mach-O "LC_LINKER_OPTION" load commands on Darwin, or invoking LTO plugins via GCC or LLVM LTO intermediate representation sections in ELF, PE/COFF, or Mach-O objects. The go command now verifies that ".syso" files, direct linker inputs, and libraries in "-L" directories are valid binary objects or archives that do not contain unallowlisted ".drectve" directives, "LC_LINKER_OPTION" load commands, or LTO IR sections, and disallows "-l:<filename>" and ":", "=", or path separators in "-l" flags.
Our coverage
We have not written about this one. Know why it matters? Send a tip.
On the lists
- cmd/go: arbitrary code execution via crafted .syso files and cgo linker input files (#82572)
- [oss-security] Go 1.27.4 and Go 1.26.11 are released with 12 security fixes
- [golang-dev] [security] Go 1.27.4 and Go 1.26.11 are released
- [go-nuts] [security] Go 1.27.4 and Go 1.26.11 are released
- [oss-security] Fwd: Go 1.27.4 and Go 1.26.11 pre-announcement
- [golang-dev] [security] Go 1.27.4 and Go 1.26.11 pre-announcement
- [go-nuts] [security] Go 1.27.4 and Go 1.26.11 pre-announcement