CVE-2026-97035
Last modified
CVE-2026-97035 is a vulnerability of currently unknown severity. When using Clang or GCC, building a malicious package that uses cgo could cause unexpected code execution at build time or write files to arbitrary directories via "-gen-*" or "-gnat*" flags in "#cgo" directives. The "-g*" wildcard in the compiler and linker flag allowlists previously matched Clang's two-argument "-gen-cdb-fragment-path <dir>" flag and GCC's two-argument "-gnatO <file>" flag, permitting compilation database fragments and sidecar output files to be written to arbitrary directories and desynchronizing flag argument parsing between the go command and the compiler driver so that subsequent arguments could be passed as unvalidated positional inputs to the linker. EPSS estimates a 0.25% chance of exploitation in the next 30 days.
Description
When using Clang or GCC, building a malicious package that uses cgo could cause unexpected code execution at build time or write files to arbitrary directories via "-gen-*" or "-gnat*" flags in "#cgo" directives. The "-g*" wildcard in the compiler and linker flag allowlists previously matched Clang's two-argument "-gen-cdb-fragment-path <dir>" flag and GCC's two-argument "-gnatO <file>" flag, permitting compilation database fragments and sidecar output files to be written to arbitrary directories and desynchronizing flag argument parsing between the go command and the compiler driver so that subsequent arguments could be passed as unvalidated positional inputs to the linker. "-gen-*" and "-gnat*" flags are now disallowed in "#cgo" compiler and linker flags.
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 |
References
Timeline
- Published
- Last Modified
- Status
- Awaiting Analysis
Frequently Asked Questions
What is CVE-2026-97035?
How severe is CVE-2026-97035?
How do I fix CVE-2026-97035?
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-9703Grafana's data source proxy did not apply role-based access …7.1
- CVE-2026-97030A trusted template author may have previously written a vali…6.1
- CVE-2026-97031Multiple ECH outer extension references are not permitted un…7.5
- CVE-2026-97032HTTP/2 servers could end up crashing due to inadvertently mo…7.5
- CVE-2026-97033Building a malicious package that uses cgo could cause arbit…
- CVE-2026-97034When using GCC, building a malicious package that uses cgo c…
- 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-97040Building a package containing a crafted ".syso" file could b…
Are you affected by CVE-2026-97035?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
