Read the docs

Crafted .syso files inject cgo linker flags in Go cmd/go and cmd/link

Priority MEDIUM 48CWE-94Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA. Impact type from CWE-94.

Summary

The Go toolchain cmd/go and cmd/link are affected before 1.26.11 and from 1.27.0-0 before 1.27.4. The linker parses a crafted .syso file that begins with a Go object header as Go object data, so cgo directives such as cgo_ldflag reach the external linker without validation (CWE-94). An unauthenticated remote attacker can inject arbitrary linker flags when a build processes a package containing such a file, with high impact to confidentiality, integrity and availability.

Written with Claude Haiku 5.5 from the sources below · 2026-11-16

Description from the CNA

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00246 15th percentileScored 2026-11-16
Fix Fixed cmd/go (Go toolchain): 1.26.11, 1.27.4cmd/link (Go toolchain): 1.26.11, 1.27.4

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
Go standard librarycmd/gobefore 1.26.11; 1.27.0-0 to before 1.27.41.26.11, 1.27.4Patch availableCNA
Go standard librarycmd/linkbefore 1.26.11; 1.27.0-0 to before 1.27.41.26.11, 1.27.4Patch availableCNA
  • cmd/go VendorGo standard library Affected before 1.26.11; 1.27.0-0 to before 1.27.4 Fixed in 1.26.11, 1.27.4 Patch available CNA
  • cmd/link VendorGo standard library Affected before 1.26.11; 1.27.0-0 to before 1.27.4 Fixed in 1.26.11, 1.27.4 Patch available CNA

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*——Go standard library

Remediation

Upgrade cmd/go and cmd/link to 1.26.11 or 1.27.4, depending on the release line in use. The sources list no advisory identifiers for this fix.

Written with Claude Haiku 5.5 from the sources below · 2026-11-16

  • Fix · CNA cmd/go (Go toolchain) Fixed in 1.26.11, 1.27.4
  • Fix · CNA cmd/link (Go toolchain) Fixed in 1.26.11, 1.27.4

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    Go toolchain cmd/go 1.26.11, 1.27.4

    9 records Highest priority Priority MEDIUM 8 MEDIUM, 1 LOW

    Other records, highest priority first

    • TI-2026-89562 Quoting flaw in Go cgo directives allows code execution at build timePriority MEDIUM 40
    • TI-2026-89557 Arbitrary code execution via crafted .syso files in Go cmd/goPriority MEDIUM 40
    • TI-2026-89556 Linker script injection in Go toolchain cmd/go via cgo flagsPriority MEDIUM 40
  • Release ·

    Go toolchain cmd/link 1.26.11, 1.27.4

    3 records Highest priority Priority MEDIUM 3 MEDIUM

    Other records, highest priority first

    • TI-2026-89561 Argument injection in Go toolchain linker flags via cgo directivesPriority MEDIUM 40
    • TI-2026-89560 Host linker flag injection via cgo directives in Go cmd/compile and cmd/linkPriority MEDIUM 40

Timeline

  1. 2026-11-11 Threatist record created from CVE-2026-97040
  2. 2026-11-11 Alias added: GHSA-9767-p5x8-v2p2
  3. 2026-11-16 CVSS score added · CISA ADP
  4. 2026-11-16 Weakness changed · CISA ADP
  5. 2026-11-16 CISA SSVC decision points changed

References

  • TI-2020-00578 Spoofing in Windows CryptoAPI ECC certificate validation KEVCVSS 3.1HIGH 8.1
  • TI-2023-23979 HTTP/2 request cancellation lets attackers exhaust server resources KEVCVSS 3.1HIGH 7.5
  • TI-2023-24278 HTTP/2 CONTINUATION flood in net/http CVSS 3.1HIGH 7.5
  • TI-2018-05208 The "go get" implementation in Go 1.9.4, when the -insecure command-line option is used… CVSS 3.1HIGH 8.8
  • TI-2024-16309 Panic when parsing invalid palette-color images in golang.org/x/image CVSS 3.1HIGH 7.5
  • TI-2022-20112 Request smuggling due to improper request handling in golang.org/x/net/http2/h2c CVSS 3.1HIGH 7.5
See all 309 →

Sources