# CVE-2026-97037: Linker script injection via split -Wl, flags and Darwin or symbol linker flags in cgo in cmd/go

Status: published. Published: 2026-11-11. Updated: 2026-11-11.

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

## Remediation

No remediation reported in collected sources

## Affected products and versions

- Go toolchain / cmd/go (cmd/go): ≥ 0; < 1.26.11 (affected, semver); ≥ 1.27.0-0; < 1.27.4 (affected, semver). Source: CNA: Go

## Severity and prioritization

- CISA KEV: No listing in collected sources

- EPSS: Not available

- SSVC: Not available

- Weaknesses: CWE-94

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://go.dev/cl/862150 (CNA: Go)

- https://go.dev/issue/82573 (CNA: Go)

- https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM (CNA: Go)

- https://pkg.go.dev/vuln/GO-2026-6854 (CNA: Go)

## Provenance

- CNA: Go: https://www.cve.org/CVERecord?id=CVE-2026-97037; retrieved 2026-11-11; source updated 2026-11-11

Revision: e89c2239cb9b8444a552714ee9d9f76b7728b5cf0ff2719120c48c3d5b565b2c

Canonical: https://y2.dev/cve/CVE-2026-97037

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.