CVE-2026-97041: Host linker flag injection via //go:cgo_* directives in cmd/compile and cmd/link

CVE-2026-97041 affects 247 listed versions of Go in the Dawnsentry catalogue.

8.8CVSS high
None knownexploitation
under 1%EPSS (next 30 days)
11 November 2026published

Affected products and versions

The versions in the Dawnsentry catalogue this CVE affects, judged from the vendor's own advisory where there is one, otherwise from the CVE record and NVD, as each version's own page says.

Go

247 of 250 listed versions are affected. Fixed in 1.27.4, 1.26.11. The newest release, 1.27.4, is not affected.

1.27.3 1.27.2 1.27.1 1.27.0 1.26.10 1.26.9 1.26.8 1.26.7 1.26.6 1.26.5 1.26.4 1.26.3 1.26.2 1.26.1 1.26.0 1.26.0-rc2 1.26.0-rc1 1.25.14 1.25.13 1.25.12 1.25.11 1.25.10 1.25.9 1.25.8 1.25.7 1.25.6 1.25.5 1.25.4 1.25.3 1.25.2 1.25.1 1.25.0 1.24.13 1.24.12 1.24.11 1.24.10 1.24.9 1.24.8 1.24.7 1.24.6 1.24.5 1.24.4 1.24.3 1.24.2 1.24.1 1.24.0 1.23.12 1.23.11 1.23.10 1.23.9 1.23.8 1.23.7 1.23.6 1.23.5 1.23.4 1.23.3 1.23.2 1.23.1 1.23.0 1.22.12 and 187 more

What it is

Building a malicious package containing "//go:cgo_*" compiler directives could inject arbitrary flags into the external linker invocation on ELF platforms. The compiler and linker did not reject commas in "//go:cgo_import_dynamic", "//go:cgo_export_dynamic", "//go:cgo_export_static", "//go:cgo_import_static", and "//go:cgo_dynamic_linker" directives, and the linker passed the dynamic linker path using "-Wl,--dynamic-linker,<path>". Furthermore, the two-argument form of "//go:cgo_import_dynamic" (which is permitted in non-cgo Go source files) could overwrite the external symbol name of a symbol already marked for cgo export. A symbol name or dynamic linker path containing a comma or leading "@" could split "-Wl,--export-dynamic-symbol=" or "-Wl,--dynamic-linker," into arbitrary host linker flags or response file arguments. The compiler and linker now reject commas in "//go:cgo_*" symbol and dynamic linker directives, the linker passes "-Wl,--dynamic-linker=<path>", and "cgo_import_dynamic" no longer overwrites symbols exported via "cgo_export_dynamic" or "cgo_export_static".

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (Go)

Published by Go on 11 November 2026. Last changed 16 November 2026.

Sources

Check one version you run: look CVE-2026-97041 up, or pick a product and version in the quick lookup.

Updated 1 December 2026.