All vulnerabilities

Go

CVE-2026-97036

Arbitrary code execution during build on darwin via "-l to_library" in cgo in cmd/go

Severity
High 8.8
Published
11 Nov 2026
Last changed
17 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
1.26.11, 1.27.4
Exploit chance
0.7% in the next 30 daysHigher than 54% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Argument injection (CWE-88)
Attack
Over the network · No login needed · Needs someone to click or open something
Attacker can
Read data · Change data · Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Sources
CVE Program

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 " 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.

From the CVE Program.

Affected software

SoftwareAffected versions
cmd/goGo · osv:Go:cmd/go
  • Every version before 1.26.11
  • From 1.27.0-0 before 1.27.4

About cmd/go

References

  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-97036