CVE-2026-97039: Golang · Flag sanitization bypass via "#cgo pkg-config:" directives in cmd/go
Affects golangSource GCVE Database
Not known to be exploited · CVSS 8.3 High : upgrade to 1.27.4 or 1.26.11 soon.
Data as of 27 Nov 2026, 09:00 UTC
Thin evidence
One scorer or none| CISA-ADP | CVSS 3.1 | 8.3 |
|---|
- 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:LExploitation evidence
Disclosed: evidence found.
CVE published 11 Nov 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by 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
| Product | Affected | Fixed in |
|---|---|---|
Bitnamigolangpkg:bitnami/golangOther threats | Affected
| Fixed in
|
Gotoolchainpkg:golang/toolchainOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available and has been released in Go versions 1.26.11 and 1.27.4. Users should upgrade to these or later versions to mitigate the vulnerability. The updated Go command disallows the problematic flags and paths and performs stricter checks on cgoCPPFLAGS to ensure internal linking safety.
Description
A vulnerability in the Go programming language's command tool (cmd/go) allows malicious packages using "#cgo pkg-config:" directives to bypass flag sanitization. This could lead to loading untrusted pkg-config ".pc" files or injecting unvalidated compiler and linker flags. The issue arises from overly permissive allowlists for certain pkg-config flags and insufficient checks on flags returned by "pkg-config --cflags". The Go command has been updated to disallow problematic flags and paths and to improve internal linking safety checks.