Read the docs

Linker script injection in Go toolchain cmd/go via cgo flags

Priority MEDIUM 40CWE-94Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
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's cmd/go command before 1.26.11 and from 1.27.0-0 before 1.27.4 is affected. Split "-Wl," flags accepted a bare second argument that the compiler driver passed to the linker as an input file, and with GNU ld.bfd some flags could load a regular file as a linker script (CWE-94). An attacker who gets a malicious package that uses cgo built can run arbitrary code at link time if a user builds it.

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

Description from the CNA

Building a malicious package that uses cgo could cause arbitrary code execution at link time by passing linker script files to the host linker via "#cgo LDFLAGS". Split "-Wl," flags that consume a following argument (such as "-Wl,-rpath", "-Wl,--just-symbols", and "-Wl,-undefined") previously accepted a bare second argument without a "-Wl," prefix, which the compiler driver passes directly to the linker as a positional input file. Additionally, when using GNU ld.bfd, flags such as "-framework", "-Wl,-framework", "-Wl,-undefined", "-Wl,--just-symbols", "-Wl,-R", "-Wl,-subsystem", and (on non-Darwin platforms) "-Wl,-sectcreate" could cause ld.bfd to interpret their arguments as linker scripts if they named a regular file on disk. The go command now requires a "-Wl," prefix on the second token of split "-Wl," flags (except "-Wl,-R"), verifies that these flags do not reference linker script files, and disallows bare "-Wl,--warn-backrefs-exclude".

Why it matters now

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

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
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
  • 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

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

Update the Go toolchain cmd/go to 1.26.11 or 1.27.4. The sources list no fixed version for any other product.

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

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-89559 Crafted .syso files inject cgo linker flags in Go cmd/go and cmd/linkPriority MEDIUM 48
    • 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

Timeline

  1. 2026-11-11 Threatist record created from CVE-2026-97037
  2. 2026-11-11 Alias added: GHSA-f47v-97w8-qc5g
  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
  6. 2026-11-17 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