CVE-2026-97042: Go toolchain cmd/cgo Path Traversal

CVE-2026-97042

NVDCVSS scored by 134c704f-9b21-4f2e-91b3-4a467353bcc0

Vulnerability Summary

Building a malicious package that uses "//go:cgo_import_dynamic" or links against a crafted PE object on Windows could pass unsafe library arguments to the external linker. The compiler only checked the first character of the library name in "//go:cgo_import_dynamic" directives and skipped validation in cgo-generated files. In addition, on Windows, "cmd/cgo" and "cmd/link" did not validate imported DLL names extracted from PE object files before emitting "-l<name>" flags for the external linker, allowing a crafted DLL name containing ".." path traversal or special characters to reference arbitrary files on disk. The compiler now validates every character of the library name in "//go:cgo_import_dynamic" directives (including in cgo-generated files on Windows) and rejects ".." path traversal, and "cmd/cgo" and "cmd/link" reject PE imported DLL names containing path separators, "..", ":", or leading "-" or "@".
Severity Level
HIGH(8.8)
Published Date
Nov 11, 2026
Last Modified
Nov 16, 2026
Exploitation Status
No confirmed exploitation yet
EPSS Score (30-Day)
0.58%Probability
Root Weakness (CWE)
The product constructs a string for a command to be executed by a separate component, but it does not properly delimit the intended arguments, options, or switches within that string.
CVSS v3.1 Base Metrics — Score 8.8 (HIGH)
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionRequired
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

Affected & Patched Versions

Affected Versions
  • Go toolchain cmd/cgo < 1.26.11
  • Go toolchain cmd/cgo >= 1.27.0-0 and < 1.27.4
  • Go toolchain cmd/compile < 1.26.11
  • Go toolchain cmd/compile >= 1.27.0-0 and < 1.27.4
  • Go toolchain cmd/link < 1.26.11
  • Go toolchain cmd/link >= 1.27.0-0 and < 1.27.4
Patched Versions
  • Go toolchain cmd/cgo 1.26.11
  • Go toolchain cmd/cgo 1.27.4
  • Go toolchain cmd/compile 1.26.11
  • Go toolchain cmd/compile 1.27.4
  • Go toolchain cmd/link 1.26.11
  • Go toolchain cmd/link 1.27.4

What to do

Plan remediation soon. No exploitation is confirmed yet, but the severity is high.

  1. Check whether you run Go toolchain cmd/cgo and which version.
  2. 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.8
  • 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/cgo CVEsYou are reading CVE-2026-97042. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

Data last checked: Dec 2, 2026 05:10 UTC