Skip to main content
CVE-2026-97041VulnerabilityPublished

Building a malicious package containing "//go:cgo_" compiler directives could inject arbitrary flags into the external

Source GCVE Database

0
Compare
Authoritative record:CVE-2026-97041· High

Not known to be exploited : upgrade to 1.27.4 or 1.26.11 soon.

Data as of 11 Nov 2026, 08:03 UTC

Severity
High

Rated High by Threat Radar's AI analysis · CVSS not yet scored by NVD

Thin evidence

One scorer or none
Patch
Available – fixed in 1.27.4, 1.26.11

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 10 Nov 2026.

What to do

Upgrade cmd/compile and cmd/link to 1.27.4 or 1.26.11.

Affected software

ProductAffectedFixed in
Go toolchaincmd/compileAffected
  • >=1.27.0-0 <1.27.4
Fixed in
  • 1.27.4
Go toolchaincmd/compileAffected
  • <1.26.11
Fixed in
  • 1.26.11
Go toolchaincmd/linkAffected
  • >=1.27.0-0 <1.27.4
Fixed in
  • 1.27.4
Go toolchaincmd/linkAffected
  • <1.26.11
Fixed in
  • 1.26.11
Gocmd/compilepkg:golang/cmd/compileOther threatsAffected
  • <1.26.11
  • >=1.27.0-0 <1.27.4
Fixed in
  • 1.26.11
  • 1.27.4
Gocmd/linkpkg:golang/cmd/linkOther 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

The issue has been fixed by updating the Go compiler and linker to reject commas in "//go:cgo_*" directives, to pass dynamic linker paths correctly, and to prevent symbol overwrites between import and export directives. Users should update to the fixed versions of the Go toolchain once available. No additional mitigation is required beyond applying the official fix.

Description

A vulnerability in the Go compiler's handling of "//go:cgo_*" directives allowed malicious packages to inject arbitrary flags into the external linker invocation on ELF platforms. This was due to the compiler and linker not rejecting commas in certain cgo directives, enabling crafted inputs to split linker flags and potentially alter symbol exports. The issue has been addressed by rejecting commas in these directives, changing how the linker passes dynamic linker paths, and preventing symbol overwrites between import and export directives.

References

Community reviews

Loading reviews…