CVE-2026-97041: Host linker flag injection via //go:cgo_* directives in cmd/compile and cmd/link
Published 2026-11-11 · Updated 2026-11-25 · Also known as GO-2026-6850
Summary
A host linker flag injection vulnerability in cmd/compile and cmd/link allows malicious Go packages containing crafted //go:cgo_* directives to inject arbitrary flags into external linker invocations on ELF platforms. Security and engineering teams using the affected Go toolchain should update to patched versions.
Who is affected
This flaw impacts environments building Go code on ELF platforms using Go toolchain versions prior to 1.26.11 or versions 1.27.0-0 through 1.27.3. Exploitation requires building a malicious package containing //go:cgo_* compiler directives with commas, leading '@' characters, or symbol overwrites. Successful exploitation allows splitting host linker flag arguments or response file arguments during external linker invocation.
Exploitability
CVSS metrics and vector details are not documented for this issue. The vulnerability has an EPSS score of 0.006 (0.481st percentile), and CISA KEV confirms there is no active exploitation.
Remediation
- Upgrade Go toolchain versions in the 1.26.x release stream to version 1.26.11 or later.
- Upgrade Go toolchain versions in the 1.27.x release stream to version 1.27.4 or later.
How to check your project
- Check the system Go toolchain version using 'go version' to confirm whether it is prior to 1.26.11 or between 1.27.0-0 and 1.27.3.
Automated analysis of the published advisory data, generated 2026-11-25. 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 flag injection?
The compiler and linker failed to reject commas and leading '@' characters in //go:cgo_* directives and allowed //go:cgo_import_dynamic to overwrite export symbol names, enabling arbitrary argument splitting into external linker invocations.
Is this vulnerability actively exploited in the wild?
No, CISA KEV reports active exploitation as 'no', and it has an EPSS score of 0.006.
Are any workarounds documented for this vulnerability?
Workarounds are not documented; upgrading to fixed Go toolchain versions (1.26.11 or 1.27.4) is required.
Original advisory description
References
- FIX https://go.dev/cl/862154
- REPORT https://go.dev/issue/82569
- WEB https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM
Source records: GO-2026-6850 (OSV.dev) · EPSS by FIRST, 2026-11-25.