CVE-2026-97037: Linker script injection via split -Wl, flags and Darwin or symbol linker flags in cgo in cmd/go
Published 2026-11-11 · Updated 2026-11-27 · Also known as BIT-golang-2026-97037, GO-2026-6854
Summary
A linker script injection vulnerability exists in the cgo toolchain of cmd/go through improper handling of split -Wl, and Darwin or symbol linker flags. Engineering and security teams managing Go toolchain deployments should update their environments.
Who is affected
Building a malicious package utilizing cgo can lead to arbitrary code execution at link time by passing linker script files to the host linker via #cgo LDFLAGS. This affects deployments utilizing vulnerable Go toolchain versions when compiling untrusted packages.
Exploitability
The severity and CVSS vector are not documented, and the vulnerability is not currently listed in the CISA Known Exploited Vulnerabilities catalog. The EPSS score is 0.007 with a percentile of 0.479.
Remediation
- Upgrade Go toolchain to version 1.26.11 or 1.27.4.
How to check your project
- Check the installed Go toolchain version using 'go version' to determine if it falls within the affected ranges (introduced 0, fixed 1.26.11; introduced 1.27.0-0, fixed 1.27.4).
Automated analysis of the published advisory data, generated 2026-11-27. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| Go | toolchain |
>= 0, < 1.26.11 | 1.26.11 | go get [email protected] |
| Go | toolchain |
>= 1.27.0-0, < 1.27.4 | 1.27.4 | go get [email protected] |
FAQ
What causes the linker script injection in cmd/go?
It is caused by split -Wl, flags accepting bare second arguments without a -Wl, prefix and certain flags causing linkers to interpret arguments as linker scripts.
Which software packages are affected?
The Go toolchain is affected, specifically versions introduced before 1.26.11 and versions from 1.27.0-0 before 1.27.4.
How has the issue been fixed in the Go toolchain?
The go command now requires a -Wl, prefix on the second token of split -Wl, flags (except -Wl,-R), verifies they do not reference linker script files, and disallows bare -Wl,--warn-backrefs-exclude.
Original advisory description
References
- FIX https://go.dev/cl/862150
- REPORT https://go.dev/issue/82573
- WEB https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM
Source records: GO-2026-6854 (OSV.dev) · EPSS by FIRST, 2026-11-27.