CVE-2026-97043
Last modified
CVE-2026-97043 is a vulnerability of currently unknown severity. Building a malicious package that uses cgo could bypass "#cgo LDFLAGS" validation and cause unexpected code execution at build time, or cause the go command to panic, via crafted quoting in "//go:cgo_ldflag" directives. When "cmd/cgo" generates "_cgo_gotypes.go", it quotes each "#cgo LDFLAGS" argument with strconv.Quote in a "//go:cgo_ldflag" directive, but "cmd/compile" and "cmd/go" parsed those directives by splitting on raw quote characters without handling backslash escapes or unquoting the string. EPSS estimates a 0.26% chance of exploitation in the next 30 days.
Description
Building a malicious package that uses cgo could bypass "#cgo LDFLAGS" validation and cause unexpected code execution at build time, or cause the go command to panic, via crafted quoting in "//go:cgo_ldflag" directives. When "cmd/cgo" generates "_cgo_gotypes.go", it quotes each "#cgo LDFLAGS" argument with strconv.Quote in a "//go:cgo_ldflag" directive, but "cmd/compile" and "cmd/go" parsed those directives by splitting on raw quote characters without handling backslash escapes or unquoting the string. This mismatch allowed disallowed linker flags or unvalidated linker search paths to be smuggled past the go command's flag checks and passed to the external linker. In addition, deduplicating LDFLAGS in the go command could panic with an out-of-bounds slice index when a prefix of the flag list matched near the end of the slice. "cmd/compile" and "cmd/go" now properly handle backslash-escaped quotes and unquote "//go:cgo_*" pragma strings with strconv.Unquote, and the slice bounds check in processCgoOutputs has been fixed.
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/compile | < 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-97043?
How severe is CVE-2026-97043?
How do I fix CVE-2026-97043?
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-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-97040Building a package containing a crafted ".syso" file could b…
- CVE-2026-97041Building a malicious package containing "//go:cgo_*" compile…
- CVE-2026-97042Building a malicious package that uses "//go:cgo_import_dyna…
- 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,…
- CVE-2026-97055SigNoz from v0.8.0 before v0.143.0 defaults the JWT tokenize…8.1
- CVE-2026-97056SigNoz versions from v0.98.0 up to (but not including) v0.14…6.8
- CVE-2026-97057redis-parser through 3.0.0 fails to validate the multi-bulk …7.5
Are you affected by CVE-2026-97043?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
