# CVE-2026-97041: Host linker flag injection via //go:cgo\_\* directives in cmd/compile and cmd/link

- Priority: **Routine**
- Reason: Not severe (CVSS 8.8, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-11-11 · Modified: 2026-11-16
- Aliases: DEBIAN-CVE-2026-97041, GO-2026-6850, UBUNTU-CVE-2026-97041, ALPINE-CVE-2026-97041
- Record: https://cvemate.com/vulnerability/CVE-2026-97041 · JSON: https://cvemate.com/vulnerability/CVE-2026-97041/json

## Description

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

## Signals

- CVSS: 8.8 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- EPSS: 0.575%, percentile 48.898%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 25)

- alpine go (Alpine Linux): \< 1.26.11-r0 \| \< 1.27.4-r0
- debian golang-1.19 (Debian): All versions (No fix recorded)
- debian golang-1.24 (Debian): All versions (No fix recorded)
- debian golang-1.26 (Debian): All versions (No fix recorded) \| \< 1.26.11-1
- debian golang-1.27 (Debian): All versions (No fix recorded) \| \< 1.27.4-1
- ubuntu golang-1.10 (Ubuntu): All versions (No fix recorded)
- ubuntu golang-1.13 (Ubuntu): All versions (No fix recorded)
- ubuntu golang-1.14 (Ubuntu): All versions (No fix recorded)
- ubuntu golang-1.16 (Ubuntu): All versions (No fix recorded)
- ubuntu golang-1.17 (Ubuntu): All versions (No fix recorded)
- ubuntu golang-1.18 (Ubuntu): All versions (No fix recorded)
- ubuntu golang-1.20 (Ubuntu): All versions (No fix recorded)
- ubuntu golang-1.21 (Ubuntu): All versions (No fix recorded)
- ubuntu golang-1.22 (Ubuntu): All versions (No fix recorded)
- ubuntu golang-1.23 (Ubuntu): All versions (No fix recorded)
- ubuntu golang-1.24 (Ubuntu): All versions (No fix recorded)
- ubuntu golang-1.25 (Ubuntu): All versions (No fix recorded)
- ubuntu golang-1.26 (Ubuntu): All versions (No fix recorded)
- ubuntu golang-1.27 (Ubuntu): All versions (No fix recorded)
- ubuntu golang-1.6 (Ubuntu): All versions (No fix recorded)

## References

- <https://security-tracker.debian.org/tracker/CVE-2026-97041>
- <https://go.dev/cl/862154>
- <https://go.dev/issue/82569>
- <https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM>
- <https://pkg.go.dev/vuln/GO-2026-6850>
- <https://ubuntu.com/security/CVE-2026-97041>
- <https://www.cve.org/CVERecord?id=CVE-2026-97041>
- <https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM/m/KsU1KfWgAQAJ>
- <https://github.com/golang/go/issues/82569>
- <https://github.com/golang/go/commit/55515b6fe4e0a74d103b565771dcd656c95da798>
- <https://github.com/golang/go/commit/820b5f3d5ee97e2ea6e7f7fc2d0967fb074aa610>
- <https://security.alpinelinux.org/vuln/CVE-2026-97041>

---

Data as of 2026-12-05T08:38:07.680Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
