CVE-2026-97039
NVDCVSS scored by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Vulnerability Summary
Building a malicious package that uses "#cgo pkg-config:" directives could load untrusted pkg-config ".pc" files or inject unvalidated compiler and linker flags. The pkg-config flag allowlist previously permitted "--with-path=" and "--personality=", allowed "--define-variable=" values beginning with "=" or "$" (which can rewrite paths in system ".pc" files into sysroot-prefixed "-L=" or "-L$SYSROOT" linker search paths), and allowed package arguments ending in ".pc" or containing path separators or "..", which caused pkg-config to load local ".pc" files directly from the package directory. In addition, flags returned by "pkg-config --cflags" in cgoCPPFLAGS were not checked when determining whether internal linking is safe. The go command now disallows "--with-path=", "--personality=", leading "=" or "$" characters in "--define-variable=" values, and local ".pc" paths in "#cgo pkg-config:" directives, and inspects cgoCPPFLAGS when checking internal linking compatibility.
CVSS v3.1 Base Metrics — Score 8.3 (HIGH)
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:LAttack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionRequired
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityLow
Affected & Patched Versions
- Go toolchain cmd/go < 1.26.11
- Go toolchain cmd/go >= 1.27.0-0 and < 1.27.4
- Go toolchain cmd/go 1.26.11
- Go toolchain cmd/go 1.27.4
What to do
Plan remediation soon. No exploitation is confirmed yet, but the severity is high.
- Check whether you run Go toolchain cmd/go and which version.
- Update to a patched version listed above, then confirm the new version.
Timeline
- Nov 11, 2026Published
- Nov 16, 2026Record last modified
- Nov 16, 2026CVSS score changed: 0.0 to 8.3
- Nov 16, 2026Severity changed to HIGH
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new Go toolchain cmd/go CVEsYou are reading CVE-2026-97039. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsExternal References
- Referencehttps://go.dev/cl/862152
- Issue Trackinghttps://go.dev/issue/82571
- Referencehttps://groups.google.com/g/golang-announce/c/iY8TY0wWgbM
- Referencehttps://pkg.go.dev/vuln/GO-2026-6852
Data last checked: Dec 2, 2026 05:10 UTC