CVE-2026-97040
Last modified
CVE-2026-97040 is a vulnerability of currently unknown severity. 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. EPSS estimates a 0.25% chance of exploitation in the next 30 days.
Description
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.
Metrics
Weakness Enumeration
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| Go toolchain | cmd/go | < 1.26.11; >= 1.27.0-0, < 1.27.4 |
| Go toolchain | cmd/link | < 1.26.11; >= 1.27.0-0, < 1.27.4 |
References
Timeline
- Published
- Last Modified
- Status
- Awaiting Analysis
Frequently Asked Questions
What is CVE-2026-97040?
How severe is CVE-2026-97040?
How do I fix CVE-2026-97040?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-97035When using Clang or GCC, building a malicious package that u…
- CVE-2026-97036On Darwin, building a malicious package that uses cgo could …
- CVE-2026-97037Building a malicious package that uses cgo could cause arbit…
- CVE-2026-97038Building a malicious package containing ".syso" files or cgo…
- CVE-2026-97039Building a malicious package that uses "#cgo pkg-config:" di…
- CVE-2026-9704A flaw was found in Keycloak. An authenticated user with low…8.8
- CVE-2026-97041Building a malicious package containing "//go:cgo_*" compile…
- CVE-2026-97042Building a malicious package that uses "//go:cgo_import_dyna…
- CVE-2026-97043Building a malicious package that uses cgo could bypass "#cg…
- CVE-2026-97045In childTextNodesAreLiteral, walking up the tree previously …6.1
- CVE-2026-9705A flaw was found in Keycloak's client registration service. …6.5
- CVE-2026-97054For HTTP/1 servers, when MaxBytesReader's limit is exceeded,…
Are you affected by CVE-2026-97040?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
