StraitOfVuln
Latest / CVE-2026-97042

CVE-2026-97042

HighCVSS 8.8 (v3.1)Awaiting Analysis
CVE.org ↗NVD ↗

Description

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 "@".

Details

CVE ID
CVE-2026-97042
Published / updated
11 Nov 2026, 05:19 UTC · last modified 16 Nov 2026, 18:17 UTC
Severity
HIGH
CVSS score
8.8 · v3.1 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H · Attack vector: Network
Affected vendor
Go toolchain
Affected products
cmd/cgo, cmd/compile, cmd/link
Affected versions
cmd/cgo: before 1.26.11, 1.27.0-0 to before 1.27.4
cmd/compile: before 1.26.11, 1.27.0-0 to before 1.27.4
cmd/link: before 1.26.11, 1.27.0-0 to before 1.27.4
From the publisher's (CNA) CVE record. NVD analysis is pending.
Fixed versions
cmd/cgo 1.26.11, cmd/cgo 1.27.4, cmd/compile 1.26.11, cmd/compile 1.27.4, cmd/link 1.26.11, cmd/link 1.27.4
Exploitation status
Not in CISA KEV (no confirmed exploitation recorded)
EPSS
0.57% probability of exploitation in the next 30 days · 49% percentile (02 Dec 2026)
Weakness
Remediation
See the vendor advisory below.
Source (CNA)
security@golang.org