Skip to main content
No exploitation reportedFix availableAwaiting NVD analysis

CVE-2026-97040

Cgo directive injection via .syso files disguised as Go object files in cmd/go and cmd/link

No exploitation reported by the sources we read.

  • Published2026-11-11
  • Fixed in1.27.4 · 1.26.11
  • WeaknessCWE-94

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

Building a package containing a crafted ".syso" file could bypass cgo flag validation and inject arbitrary linker flags when linking. When loading ".syso" entries from a package archive, the linker only checked for recognized host object headers (ELF, Mach-O, PE, and XCOFF) before falling through to Go object parsing. A ".syso" file beginning with a "go object" header was parsed as a Go compiler object, allowing untrusted cgo metadata directives (such as "cgo_ldflag" or "cgo_dynamic_linker") embedded in the ".syso" file to be passed to the external linker without validation. Additionally, ".syso" filenames longer than 16 bytes lost their ".syso" extension when truncated in archive headers, and unrecognized ".syso" formats forced external linking in pure-Go builds. The linker now rejects ".syso" files that are not recognized host object formats, and "cmd/go" and "cmd/pack" preserve the ".syso" suffix when truncating long archive member names.

Timeline

dates in UTC
  1. 2026-11-1103:13CVE publishedCNA

Versions per branch

OSV
toolchain
BranchAffectedFixed in
1.27≥ 1.27.0-0, < 1.27.41.27.4
1.26< 1.26.111.26.11

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA2 products

As Go, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • Go toolchain cmd/goother versions: not affected

    package cmd/gohttps://pkg.go.dev

    Affected
    • < 1.26.11fixed in 1.26.11semver
    • ≥ 1.27.0-0, < 1.27.4fixed in 1.27.4semver
  • Go toolchain cmd/linkother versions: not affected

    package cmd/linkhttps://pkg.go.dev

    Affected
    • < 1.26.11fixed in 1.26.11semver
    • ≥ 1.27.0-0, < 1.27.4fixed in 1.27.4semver

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2026-11-11

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • gccAzure Linux:3all versions · no fixed version listedand 3 other packages
  • goAlpine:v3.24all versions · fixed in 1.26.11-r0
  • go1.26SUSE:Linux Enterprise Server for SAP Applications 15 SP6all versions · fixed in 1.26.11-150000.1.39.1
  • go1.26SUSE:Linux Enterprise Server for SAP Applications 15 SP5all versions · fixed in 1.26.11-150000.1.39.1
  • go1.26SUSE:Linux Enterprise Server for SAP Applications 15 SP4all versions · fixed in 1.26.11-150000.1.39.1
  • go1.26SUSE:Linux Enterprise Server 15 SP6-LTSSall versions · fixed in 1.26.11-150000.1.39.1
  • go1.26SUSE:Linux Enterprise Server 15 SP5-LTSSall versions · fixed in 1.26.11-150000.1.39.1
  • go1.26SUSE:Linux Enterprise Server 15 SP4-LTSSall versions · fixed in 1.26.11-150000.1.39.1

35 more package ranges on OSV.dev

Full record on NVD

Fix

  1. Update toolchain to 1.27.4 · 1.26.11

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published
2026-11-11
Last Modified
2026-11-16
NVD status
Awaiting Analysis
GitHub Advisory
GHSA-9767-p5x8-v2p2

Frequently asked questions

What is CVE-2026-97040?

Building a package containing a crafted ".syso" file could bypass cgo flag validation and inject arbitrary linker flags when linking. When loading ".syso" entries from a package archive, the linker only checked for recognized host object headers (ELF, Mach-O, PE, and XCOFF) before falling through to Go object parsing. A ".syso" file beginning with a "go object" header was parsed as a Go compiler object, allowing untrusted cgo metadata directives (such as "cgo_ldflag" or "cgo_dynamic_linker") embedded in the ".syso" file to be passed to the external linker without validation. Additionally, ".syso" filenames longer than 16 bytes lost their ".syso" extension when truncated in archive headers, and unrecognized ".syso" formats forced external linking in pure-Go builds. The linker now rejects ".syso" files that are not recognized host object formats, and "cmd/go" and "cmd/pack" preserve the ".syso" suffix when truncating long archive member names.

Is CVE-2026-97040 actively exploited?

Active exploitation of CVE-2026-97040 has not been confirmed. Its EPSS score was 0.2% on 2026-11-15, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2026-97040?

CVE-2026-97040 has a CVSS v3 base score of 9.8 (CRITICAL severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

Running Go? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record