Go toolchain · Go · published 2026-11-11

CVE-2026-97043Unexpected code execution via escaped quotes in //go:cgo_ldflag in cmd/go and cmd/compile

Routine No exploitation evidence; EPSS 0.6%.

CVE-2026-97043 is not known to be exploited in the wild. EPSS estimates a 0.6% chance of exploitation in the next 30 days, higher than 47% of all CVEs. This Go vulnerability: CVSS 8.8 (v3.1), a successful attack gives total control of the component. Fixed upstream in Go 1.27.4, 1.26.11; Ubuntu still has unfixed releases. Routine: patch when convenient.

Share this

Remediation#

Fixed upstream in Go 1.27.4, 1.26.11.

Linux distribution packages

If you run the distro’s package rather than an upstream build, this is the version to look for.

DistroReleasePackageStatus
Debian13 trixiegolang-1.24Won’t fix
12 bookwormgolang-1.19Won’t fix
Ubuntu (+28 more packages)26.04 LTSgolang-1.24No fix yet
24.04 LTSgolang-1.24No fix yet
22.04 LTSgolang-1.24No fix yet

From the Debian Security Tracker, Ubuntu security notices (CC BY-SA 4.0) and Red Hat Security Data (CC BY 4.0). Check the distro link before acting.

Patch events

  1. This monthSecurity release

    Language runtimeGo

    Go security releases: 1.27.4, 1.26.11

    Upgrade to 1.27.41.26.11

    Why: Vendor security release for server software (most severe: CVE-2026-97040).

Exploit intelligence#

SignalValueSource
Known exploitedNoCISA KEV
Ransomware use—CISA KEV
EPSS (30-day exploitation probability)0.6% (48th pct)FIRST EPSS v2026.06.15
CVSS base score8.8 (v3.1)
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CNA / CISA ADP
SSVC exploitationnoneCISA Vulnrichment
SSVC automatableNoCISA Vulnrichment
SSVC technical impacttotalCISA Vulnrichment

Affected versions (from the CVE record)#

Description (from the CVE record)#

Building a malicious package that uses cgo could bypass "#cgo LDFLAGS" validation and cause unexpected code execution at build time, or cause the go command to panic, via crafted quoting in "//go:cgo_ldflag" directives. When "cmd/cgo" generates "_cgo_gotypes.go", it quotes each "#cgo LDFLAGS" argument with strconv.Quote in a "//go:cgo_ldflag" directive, but "cmd/compile" and "cmd/go" parsed those directives by splitting on raw quote characters without handling backslash escapes or unquoting the string. This mismatch allowed disallowed linker flags or unvalidated linker search paths to be smuggled past the go command's flag checks and passed to the external linker. In addition, deduplicating LDFLAGS in the go command could panic with an out-of-bounds slice index when a prefix of the flag list matched near the end of the slice. "cmd/compile" and "cmd/go" now properly handle backslash-escaped quotes and unquote "//go:cgo_*" pragma strings with strconv.Unquote, and the slice bounds check in processCgoOutputs has been fixed.

Quoted from the CVE Program record.

Elsewhere#

Distro status: Debian · Ubuntu · Red Hat · Alpine

Something wrong on this page?
Anonymous. Reports are checked against the primary source.

Also on today's list

See today's list → · Coming up →