CVE-2026-97036

critical

Description

On Darwin, building a malicious package that uses cgo could cause arbitrary code execution when using the Apple linker due to passing "-l to_library <path>" in a "#cgo LDFLAGS" directive. The Apple linker recombines the separated arguments "-l" and "to_library" into "-lto_library", which loads an arbitrary LTO plugin dynamic library at link time. The go command now disallows "-l" followed by "to_library" in "#cgo LDFLAGS", rejects "-lazy_library", "-lazy_framework", "-load_hidden", "-library", and "-library-path", and checks recombined "-l" arguments against disallowed linker flags and patterns.

References

https://pkg.go.dev/vuln/GO-2026-6855

https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM

https://go.dev/issue/82574

https://go.dev/cl/862149

https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-123109

Details

Source: Mitre, NVD

Published: 2026-11-11

Updated: 2026-11-11

Risk Information

CVSS v2

Base Score: 7.5

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P

Severity: High

CVSS v3

Base Score: 9.8

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Severity: Critical