{"id":"CVE-2026-97040","published":"2026-11-11T05:19:58Z","modified":"2026-11-16T18:17:34Z","title":"Cgo directive injection via .syso files disguised as Go object files in cmd/go and cmd/link","vendor":"Go toolchain","product":"cmd/go","tier":"core","eol":null,"affectedVersions":[{"vendor":"Go toolchain","product":"cmd/go","versions":["< 1.26.11",">= 1.27.0-0, < 1.27.4"]},{"vendor":"Go toolchain","product":"cmd/link","versions":["< 1.26.11",">= 1.27.0-0, < 1.27.4"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2026-11-16T17:26:50.692075Z","from":"CISA ADP","provenance":"source"},"nvdStatus":"Awaiting Analysis","description":{"text":"Building a package containing a crafted \".syso\" file could bypass cgo flag validation and inject arbitrary linker flags when linking. When loading \".syso\" entries from a package archive, the linker only checked for recognized host object headers (ELF, Mach-O, PE, and XCOFF) before falling through to Go object parsing. A \".syso\" file beginning with a \"go object\" header was parsed as a Go compiler object, allowing untrusted cgo metadata directives (such as \"cgo_ldflag\" or \"cgo_dynamic_linker\") embedded in the \".syso\" file to be passed to the external linker without validation. Additionally, \".syso\" filenames longer than 16 bytes lost their \".syso\" extension when truncated in archive headers, and unrecognized \".syso\" formats forced external linking in pure-Go builds. The linker now rejects \".syso\" files that are not recognized host object formats, and \"cmd/go\" and \"cmd/pack\" preserve the \".syso\" suffix when truncating long archive member names.","provenance":"source","from":"NVD"},"summary":{"text":"The flaw lies in the Go toolchain's cmd/go and cmd/link components: when a package contains a \".syso\" file that begins with a Go object header, the linker parses it as a Go object and passes embedded cgo directives such as \"cgo_ldflag\" or \"cgo_dynamic_linker\" to the external linker without validation. An attacker who can get a crafted \".syso\" file into a package that is then built, with no further authentication or user interaction required, can inject arbitrary linker flags during the build.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T03:47:04Z"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"NVD"},"epss":{"score":0.00799,"percentile":0.57468,"date":"2026-11-21","provenance":"source"},"kev":null,"vulncheckKev":null,"exploited":false,"otx":{"pulseCount":7,"pulses":[{"name":"Known_Cve | Nov 18, 2026 | Part 2/3","url":"https://otx.alienvault.com/pulse/6afc69b3bc28daace05c09f1","created":"2026-11-17"},{"name":"Known_Cve | Nov 17, 2026 | Part 2/3","url":"https://otx.alienvault.com/pulse/6afb181e7e7db74fafe494c9","created":"2026-11-16"},{"name":"Known_Cve | Nov 16, 2026 | Part 2/3","url":"https://otx.alienvault.com/pulse/6af9c65555202e7d52e3d1a4","created":"2026-11-15"},{"name":"Known_Cve | Nov 15, 2026 | Part 2/3","url":"https://otx.alienvault.com/pulse/6af8757d9e26c4ac77afc4a8","created":"2026-11-14"},{"name":"Known_Cve | Nov 14, 2026 | Part 3/3","url":"https://otx.alienvault.com/pulse/6af723f1216b67fbba03e4a7","created":"2026-11-13"},{"name":"Known_Cve | Nov 13, 2026 | Part 3/3","url":"https://otx.alienvault.com/pulse/6af5d2cab635e0ec2ea03927","created":"2026-11-12"},{"name":"Known_Cve | Nov 12, 2026 | Part 3/3","url":"https://otx.alienvault.com/pulse/6af481822fe4c9dc3387eb53","created":"2026-11-11"}],"provenance":"machine"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://go.dev/cl/862153","tags":[]},{"url":"https://go.dev/issue/82570","tags":[]},{"url":"https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM","tags":[]},{"url":"https://pkg.go.dev/vuln/GO-2026-6851","tags":[]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"Go","package":"toolchain","vulnerableRanges":["<1.26.11",">=1.27.0-0, <1.27.4"],"patched":["1.26.11","1.27.4"],"from":["GO-2026-6851"],"provenance":"source"}],"advisories":[{"id":"GO-2026-6851","url":"https://osv.dev/vulnerability/GO-2026-6851","severity":null,"ecosystem":"Go","package":"toolchain","vulnerableRanges":["<1.26.11",">=1.27.0-0, <1.27.4"],"patched":["1.26.11","1.27.4"],"provenance":"source","from":"OSV"}],"euvd":{"id":"EUVD-2026-123105","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-123105","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":null,"exploitRefs":[],"flow":[],"timeline":[{"date":"2026-11-11","kind":"published","label":"Published (NVD)","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97040","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":null,"daysToKev":null},"priority":{"score":20.4,"factors":[{"name":"In a KEV catalog","points":0.0,"detail":"not listed"},{"name":"Recent KEV listing","points":0.0,"detail":"not listed"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":11.49,"detail":"percentile 0.5747"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":0.0,"detail":"none found"},{"name":"Mentioned in OTX pulses","points":2.05,"detail":"7 pulses"},{"name":"CVSS severity","points":6.86,"detail":"base score 9.8"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}