AZL-113591: CVE-2026-97036 affecting package python-tensorboard 2.16.2-6
On Darwin, building a malicious package that uses cgo could cause arbitrary code execution when using the Apple linker due to passing "-l tolibrary <path>" in a "#cgo LDFLAGS" directive. The Apple linker recombines the separated arguments "-l" and "tolibrary" into "-ltolibrary", which loads an arbitrary LTO plugin dynamic library at link time. The go command now disallows "-l" followed by "tolibrary" in "#cgo LDFLAGS", rejects "-lazylibrary", "-lazyframework", "-loadhidden", "-library", and "-library-path", and checks recombined "-l" arguments against disallowed linker flags and patterns.
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
The issue applies on Darwin (macOS) when building a malicious package that uses cgo. The described behavior depends on the Apple linker.
What must an attacker provide to trigger code execution?
An attacker would need to supply a malicious package containing cgo directives with crafted #cgo LDFLAGS. The dangerous form uses a separated "-l" and "to_library <path>" argument sequence, which the Apple linker recombines and uses to load an LTO plugin library during linking.
What protections are described for the go command?
The go command now rejects "-l" followed by "to_library" in #cgo LDFLAGS, as well as -lazy_library, -lazy_framework, -load_hidden, -library, and -library-path. It also checks recombined -l arguments against disallowed linker flags and patterns.