Skip to main content
CVE-2026-97035VulnerabilityPublished

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

Affects golangSource GCVE Database

0
Compare
Authoritative record:CVE-2026-97035· High 8.8

Not known to be exploited · CVSS 8.8 High : upgrade to 1.27.4 or 1.26.11 soon.

Data as of 27 Nov 2026, 09:00 UTC

CVSS 3.1 base score
8.8High
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CISA-ADPCVSS 3.18.8
Patch
Available – fixed in 1.27.4, 1.26.11
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 11 Nov 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Nov 2026.

What to do

Upgrade golang and toolchain to 1.27.4 or 1.26.11.

Affected software

ProductAffectedFixed in
Bitnamigolangpkg:bitnami/golangOther threatsAffected
  • <1.26.11
  • >=1.27.0-0 <1.27.4
Fixed in
  • 1.26.11
  • 1.27.4
Gotoolchainpkg:golang/toolchainOther threatsAffected
  • <1.26.11
  • >=1.27.0-0 <1.27.4
Fixed in
  • 1.26.11
  • 1.27.4

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Upgrade to Go versions 1.26.11 or later, or 1.27.4 or later, where the vulnerability is fixed by disallowing the -gen-* and -gnat* flags in #cgo compiler and linker directives. No other mitigation is necessary as the fix is official and available.

Description

A vulnerability in the Go programming language's cgo tool allows unexpected code execution or arbitrary file writes during build time when using Clang or GCC compilers. This occurs due to improper handling of certain compiler and linker flags (-gen-* and -gnat*) in #cgo directives, which can lead to writing files to arbitrary directories or passing unvalidated inputs to the linker. The issue affects Go versions prior to 1.26.11 and versions from 1.27.0 up to but not including 1.27.4. The vulnerability has been addressed by disallowing these flags in #cgo directives.

References

Community reviews

Loading reviews…