Every CVESearch/Get API key

CVE-2026-97035

Unexpected code execution and arbitrary file write via Clang -gen-* and GCC -gnat* flags in cgo in cmd/go

No scoreFix available

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.

Exploit likelihood

0.25%Unchanged since Nov 11, 2026
90%50%10%1%

What each source reports

CVE ListNo score

Unexpected code execution and arbitrary file write via Clang -gen-* and GCC -gnat* flags in cgo in cmd/go

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.

Record
CVE-2026-97035
Updated
2026-11-11
EUVDEUVD-2026-123110No score

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.

Record
EUVD-2026-123110
Updated
2026-11-11
GitHub AdvisoriesGHSA-6f8j-v7cw-qxppNo score

When using Clang or GCC, building a malicious package that uses cgo could cause unexpected code...

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.

Record
GHSA-6f8j-v7cw-qxpp
Updated
2026-11-11
NVDNo score

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.

Record
CVE-2026-97035
Updated
2026-11-11
OSVDEBIAN-CVE-2026-97035No score

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.

Record
DEBIAN-CVE-2026-97035
Updated
2026-11-11
OSVGO-2026-6856No score

Unexpected code execution and arbitrary file write via Clang -gen-* and GCC -gnat* flags in cgo in cmd/go

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.

Record
GO-2026-6856
Updated
2026-11-11
OSVopenSUSE-SU-2026:12529-1No score

go1.26-1.26.11-1.1 on GA media

These are all security issues fixed in the go1.26-1.26.11-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2026:12529-1
Updated
2026-11-12

Affected products

Affected packages

Affected packages
PackageAffectedFixed
golang-1.19
Debian:12
All versions, plus listed versions
1.19.10-11.19.10-21.19.11-11.19.12-11.19.12-2
Show 7 moreShow less
1.19.12-2~bpo11+11.19.12-2~bpo12+11.19.13-11.19.13-1~bpo11+11.19.13-1~bpo12+11.19.8-21.19.9-1
None known
golang-1.24
Debian:13
All versions, plus listed versions
1.24.12-11.24.13-11.24.13-21.24.4-11.24.4-2
Show 5 moreShow less
1.24.4-31.24.4-41.24.7-11.24.8-11.24.9-1
None known
golang-1.26
Debian:14
All versions, plus listed versions
1.26.0-11.26.1-11.26.10-11.26.10-1~bpo13+11.26.11-1
Show 23 moreShow less
1.26.2-11.26.2-21.26.2-31.26.3-11.26.3-1~bpo13+11.26.3-21.26.3-2~bpo13+11.26.4-11.26.4-1~bpo13+11.26.5-11.26.5-1~bpo13+11.26.6-11.26.6-21.26.7-11.26.7-1~bpo13+11.26.8-11.26.8-1~bpo13+11.26.8-21.26.9-11.26.9-1~bpo13+11.26~rc2-11.26~rc3-11.26~rc3-2
None known
golang-1.27
Debian:14
All versions, plus listed versions
1.27.0-11.27.0-1~bpo13+11.27.1-11.27.1-21.27.1-2~bpo13+1
Show 9 moreShow less
1.27.2-11.27.2-1~bpo13+11.27.2-1~bpo13+21.27.3-11.27.3-1~bpo13+11.27.4-11.27~rc1-11.27~rc2-11.27~rc3-1
None known
toolchain
Go
before 1.26.11, 1.27.0-0 up to 1.27.4
1.26.111.27.4
go1.26
openSUSE:Tumbleweed
From an advisory covering 12 CVEs
before 1.26.11-1.1
1.26.11-1.1

History

History
RecordedChangedSources
affected, aliases, published, referencesEUVD, OSV
publishedEUVD, NVD, OSV
aliases, referencesGitHub Advisories
affectedOSV
aliasesEUVD
description, products, referencesCVE List
affected, aliases, description, facts, references, titleOSV
first indexedOSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-97035 is a vulnerability with no CVSS score yet in Go Toolchain Cmd/go, published November 11, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.25%, the 16th percentile. Fixed in toolchain 1.26.11.

References

Show 13 moreShow less
MoveEnter Open