Arbitrary Linker Flag Injection Vulnerability in Go Programming Language
CVE-2026-97040

Currently unrated

Key Information:

Vendor
CVE Published:
11 November 2026

What is CVE-2026-97040?

This vulnerability arises from improper validation of crafted '.syso' files in Go packages, enabling the injection of arbitrary linker flags. When a '.syso' file begins with a Go object header, the linker fails to validate the accompanying untrusted cgo metadata directives, allowing potentially malicious commands to be executed without appropriate safeguards. Additionally, issues with truncated '.syso' filenames exacerbate the risk by leading to external linking in pure-Go builds. The Go linker has since implemented stricter checks to reject unrecognized '.syso' formats and preserve the '.syso' extension in archive member names.

Affected Version(s)

cmd/go 0 < 1.26.11

cmd/go 1.27.0-0 < 1.27.4

cmd/link 0 < 1.26.11

References

Timeline

  • Vulnerability published

  • Vulnerability Reserved

Credit

RyotaK (https://ryotak.net) of GMO Flatt Security Inc.
.