# CVE-2026-97040: Cgo directive injection via .syso files disguised as Go object files in cmd/go and cmd/link

- Priority: **Prioritise**
- Reason: Severe, CVSS 9.8 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 04-12-2026)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2026-11-11 · Modified: 2026-11-16
- Aliases: DEBIAN-CVE-2026-97040, GO-2026-6851, UBUNTU-CVE-2026-97040, ALPINE-CVE-2026-97040
- Record: https://cvemate.com/vulnerability/CVE-2026-97040 · JSON: https://cvemate.com/vulnerability/CVE-2026-97040/json

## Description

```text
Building a package containing a crafted ".syso" file could bypass cgo flag validation and inject arbitrary linker flags when linking. When loading ".syso" entries from a package archive, the linker only checked for recognized host object headers (ELF, Mach-O, PE, and XCOFF) before falling through to Go object parsing. A ".syso" file beginning with a "go object" header was parsed as a Go compiler object, allowing untrusted cgo metadata directives (such as "cgo_ldflag" or "cgo_dynamic_linker") embedded in the ".syso" file to be passed to the external linker without validation. Additionally, ".syso" filenames longer than 16 bytes lost their ".syso" extension when truncated in archive headers, and unrecognized ".syso" formats forced external linking in pure-Go builds. The linker now rejects ".syso" files that are not recognized host object formats, and "cmd/go" and "cmd/pack" preserve the ".syso" suffix when truncating long archive member names.
```

## Signals

- CVSS: 9.8 critical (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.799%, percentile 57.893%, 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-97040>
- <https://go.dev/cl/862153>
- <https://go.dev/issue/82570>
- <https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM>
- <https://pkg.go.dev/vuln/GO-2026-6851>
- <https://ubuntu.com/security/CVE-2026-97040>
- <https://www.cve.org/CVERecord?id=CVE-2026-97040>
- <https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM/m/KsU1KfWgAQAJ>
- <https://github.com/golang/go/issues/82570>
- <https://github.com/golang/go/commit/b207530349f4407d7534645681cb23c164ff217b>
- <https://github.com/golang/go/commit/c8fc31064879b461e0fd86f4aa1dc3cbe3a42d84>
- <https://security.alpinelinux.org/vuln/CVE-2026-97040>

---

Data as of 2026-12-05T08:38:07.769Z. 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
