AZL-113660: CVE-2026-97038 affecting package tensorflow 2.16.1-11
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 "LCLINKEROPTION" 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, "LCLINKEROPTION" load commands, or LTO IR sections, and disallows "-l:<filename>" and ":", "=", or path separators in "-l" flags.
Affected Software
Event History
Frequently Asked Questions
What conditions are required to exploit this issue?
An attacker must be able to cause a malicious package to be built, supplying crafted .syso files, cgo linker inputs, or libraries reachable through -L directories. The malicious input can masquerade as a library or object file and influence the external linker during the build.
Which build environments are exposed?
The issue applies across platforms, with different mechanisms depending on the platform: GNU ld linker scripts, Windows PE/COFF .drectve sections, Darwin Mach-O LC_LINKER_OPTION commands, and LTO intermediate-representation sections in ELF, PE/COFF, or Mach-O objects.
How can teams reduce risk if they cannot immediately update?
Avoid building untrusted packages or accepting untrusted .syso files, cgo LDFLAGS direct inputs, and libraries from -L directories. Treat linker inputs as untrusted even when they use library or object-file names, since crafted inputs can embed linker options or LTO content.