CVE-2026-97035 (GCVE-0-2026-97035)
Vulnerability from cvelistv5 – Published: 2026-11-11 03:13 – Updated: 2026-11-11 03:13
VLAI
EPSS
VEX
Title
Unexpected code execution and arbitrary file write via Clang -gen-* and GCC -gnat* flags in cgo in cmd/go
Summary
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.
Severity
No CVSS data available.
CWE
- CWE-88 - Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
Assigner
References
Impacted products
1 product
| Vendor | Product | Version | |
|---|---|---|---|
| Go toolchain | cmd/go |
Affected:
0 , < 1.26.11
(semver)
Affected: 1.27.0-0 , < 1.27.4 (semver) |
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://pkg.go.dev",
"defaultStatus": "unaffected",
"packageName": "cmd/go",
"product": "cmd/go",
"vendor": "Go toolchain",
"versions": [
{
"lessThan": "1.26.11",
"status": "affected",
"version": "0",
"versionType": "semver"
},
{
"lessThan": "1.27.4",
"status": "affected",
"version": "1.27.0-0",
"versionType": "semver"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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\u0027s two-argument \"-gen-cdb-fragment-path \u003cdir\u003e\" flag and GCC\u0027s two-argument \"-gnatO \u003cfile\u003e\" 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."
}
],
"problemTypes": [
{
"descriptions": [
{
"description": "CWE-88: Improper Neutralization of Argument Delimiters in a Command (\u0027Argument Injection\u0027)",
"lang": "en"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-11T03:13:16.798Z",
"orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
"shortName": "Go"
},
"references": [
{
"url": "https://go.dev/cl/862148"
},
{
"url": "https://go.dev/issue/82575"
},
{
"url": "https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM"
},
{
"url": "https://pkg.go.dev/vuln/GO-2026-6856"
}
],
"title": "Unexpected code execution and arbitrary file write via Clang -gen-* and GCC -gnat* flags in cgo in cmd/go"
}
},
"cveMetadata": {
"assignerOrgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
"assignerShortName": "Go",
"cveId": "CVE-2026-97035",
"datePublished": "2026-11-11T03:13:16.798Z",
"dateReserved": "2026-09-23T23:05:04.987Z",
"dateUpdated": "2026-11-11T03:13:16.798Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"vulnerability-lookup:meta": {
"epss": {
"cve": "CVE-2026-97035",
"date": "2026-11-16",
"epss": "0.00252",
"percentile": "0.16799"
},
"microsoft_vex": {
"current_release_date": "2026-11-13T14:51:34.000Z",
"cve": "CVE-2026-97035",
"id": "msrc_CVE-2026-97035",
"initial_release_date": "2026-11-13T01:04:23.000Z",
"product_status:known_affected": "7",
"source": "Microsoft CSAF VEX",
"status": "final",
"title": "Unexpected code execution and arbitrary file write via Clang -gen-* and GCC -gnat* flags in cgo in cmd/go",
"url": "https://msrc.microsoft.com/csaf/vex/2026/msrc_cve-2026-97035.json",
"version": "2"
},
"nvd": {
"cve": {
"affected": [
{
"affectedData": [
{
"collectionURL": "https://pkg.go.dev",
"defaultStatus": "unaffected",
"packageName": "cmd/go",
"product": "cmd/go",
"vendor": "Go toolchain",
"versions": [
{
"lessThan": "1.26.11",
"status": "affected",
"version": "0",
"versionType": "semver"
},
{
"lessThan": "1.27.4",
"status": "affected",
"version": "1.27.0-0",
"versionType": "semver"
}
]
}
],
"source": "security@golang.org"
}
],
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "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\u0027s two-argument \"-gen-cdb-fragment-path \u003cdir\u003e\" flag and GCC\u0027s two-argument \"-gnatO \u003cfile\u003e\" 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."
}
],
"id": "CVE-2026-97035",
"lastModified": "2026-11-12T22:09:39.233",
"metrics": {},
"published": "2026-11-11T05:19:57.550",
"references": [
{
"source": "security@golang.org",
"url": "https://go.dev/cl/862148"
},
{
"source": "security@golang.org",
"url": "https://go.dev/issue/82575"
},
{
"source": "security@golang.org",
"url": "https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM"
},
{
"source": "security@golang.org",
"url": "https://pkg.go.dev/vuln/GO-2026-6856"
}
],
"sourceIdentifier": "security@golang.org",
"vulnStatus": "Awaiting Analysis"
}
},
"suse_vex": {
"aggregate_severity": "important",
"current_release_date": "2026-11-14T01:10:14Z",
"cve": "CVE-2026-97035",
"id": "CVE-2026-97035",
"initial_release_date": "2026-11-11T17:56:36Z",
"product_status:known_affected": "207",
"product_status:known_not_affected": "214",
"product_status:recommended": "96",
"source": "SUSE CSAF VEX",
"status": "interim",
"title": "SUSE CVE CVE-2026-97035",
"url": "https://ftp.suse.com/pub/projects/security/csaf-vex/2026/cve-2026-97035.json",
"version": "3"
}
}
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…
The MITRE ATT&CK techniques below are AI-generated suggestions, inferred from the description of the
vulnerability by the CIRCL/vulnerability-attack-technique-classification-roberta-base
model, served locally by ML-Gateway.
They have not been verified by an analyst and are provided for guidance only.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Loading…
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.
Loading…