GHSA-9767-p5x8-v2p2
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPublish malicious Go module with crafted .syso
-
ExploitVictim builds package including the .syso entry
-
ExecutionLinker parses go-object header and extracts cgo directives
-
ImpactUnvalidated linker flags execute arbitrary code at build time
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the victim to BUILD a package that contains an attacker-crafted '.syso' file whose contents begin with a 'go object' header; it is not triggered by running already-built binaries. The affected toolchain components are cmd/link and cmd/go (via cmd/pack archive handling) in default configuration - no special build flag is needed once the malicious '.syso' is present. Concretely, the attacker must get the crafted '.syso' into source the victim compiles (e.g., a malicious module dependency or submitted code), and the linker falls through its host-object header checks (ELF, Mach-O, PE, XCOFF) to Go object parsing, accepting cgo_ldflag/cgo_dynamic_linker directives. Contributing conditions include '.syso' filenames longer than 16 bytes losing their extension on archive-header truncation and unrecognized '.syso' formats forcing external linking in pure-Go builds. LIMITING FACTOR: the victim must compile untrusted/attacker-controlled code - organizations that only build vetted first-party code are not exposed; affected versions are cmd/link and cmd/go before 1.26.11 and 1.27.0 through before 1.27.4. |
| Impact | This is a genuine build-time code-execution flaw in the Go toolchain (cmd/link and cmd/go), rated CVSS 9.8 (AV:N/AC:L/PR:N/UI:N) with CWE-94 code injection, and the vuln.today priority is act_now, so it should be prioritized for patching. However, the signals conflict and the raw 9.8 overstates remote exposure: the described mechanism is NOT a network service flaw but a supply-chain/build-time issue - an attacker-controlled package containing a crafted '.syso' file must be built by the victim for the linker to parse embedded 'go object' headers and pass unvalidated cgo directives (cgo_ldflag/cgo_dynamic_linker) to the external linker. The CVSS vector marks AV:N/UI:N, but the description implies the victim must compile untrusted source (e.g., a malicious module dependency), which is closer to local vector with required user action - verify scoring against the Go security model. Supporting a lower-urgency read: EPSS is only 0.25% (16th percentile), there is no CISA KEV listing, and no public exploit is referenced - the only links are vendor advisories and the fix changeset. The combination (high technical impact, patch available, but low exploitation probability and no observed in-the-wild use) points to a serious-but-not-emergency defect primarily relevant to those who build untrusted Go code or dependencies in CI. |
| Exploit ScenarioDerived | An attacker publishes a malicious Go module containing a crafted '.syso' file that begins with a 'go object' header; when a developer or CI pipeline adds and builds this dependency, the linker parses the file as a Go compiler object and passes attacker-embedded cgo_ldflag/cgo_dynamic_linker directives to the external linker, achieving arbitrary code execution during the build. Exploitation requires the victim to compile the attacker-supplied package (AC:L once the package is built). No public exploit identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Nov 16, 2026
Build-time code injection in the Go toolchain lets an attacker who can place a crafted ".syso" file into source that a victim compiles smuggle unvalidated linker directives (cgo_ldflag, cgo_dynamic_linker) into the external linker, yielding arbitrary code execution in the build environment. Affected components are cmd/link and cmd/go (archive handling shared with cmd/pack) in Go releases before 1.26.11 and in the 1.27 line before 1.27.4; the flaw is only reachable when the victim builds attacker-controlled packages, not by running already-compiled binaries. NVD rates it CVSS 9.8, while the assessed vector is AV:L/AC:L/PR:N/UI:R (build-time, user-interaction dependent); EPSS is low at 0.25% and no public exploit has been identified at time of analysis, but the vuln.today priority is act_now and a vendor patch is available.
Earlier versions of this analysis (1)
CVE-2026-97040 is one of twelve Go security issues covered by the Go team's pre-announcement for the Go 1.27.4 and Go 1.26.11 releases, published to the oss-security mailing list ahead of the embargoed advisories. The pre-announcement deliberately withholds the affected package, API, deployment mode, and impact for this specific identifier, and no CVSS vector, CWE, or exploitation data accompanies it. Consequently, risk cannot be meaningfully quantified from the available data, and no public exploit code has been identified at time of analysis. Vulnerability triage is pending release of the full advisory alongside the fixed toolchain versions.
RemediationAI
Vendor-released patch: upgrade to Go 1.26.11 or later on the 1.26 branch, or Go 1.27.4 or later on the 1.27 branch; these versions make cmd/link reject ".syso" files that are not recognized host object formats and make cmd/go and cmd/pack preserve the ".syso" suffix when truncating long archive member names. Advisory and tracking details are at https://pkg.go.dev/vuln/GO-2026-6851, https://go.dev/issue/82570 and https://go.dev/cl/862153, with the release announcement at https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM. Because the flaw is only reachable when the toolchain compiles attacker-supplied source, organizations that cannot upgrade immediately should treat building untrusted or third-party Go modules as the exposure boundary and restrict such builds to isolated, least-privilege build environments until the toolchain is patched.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The Go linker (cmd/link) inspects archive members ending in ".syso" to decide how to treat them: it first checks for recognized host object headers (ELF, Mach-O, PE, XCOFF) and, if none match, falls through to Go object parsing. A ".syso" file that begins with a "go object" header is therefore parsed as a Go compiler object, and cgo metadata directives such as cgo_ldflag and cgo_dynamic_linker embedded in that file are forwarded to the external linker without validation. This is a CWE-94 code-injection class problem: untrusted data in a package archive is interpreted as control directives for a downstream tool. Two contributing behaviors compounded it - ".syso" filenames longer than 16 bytes lost their extension when truncated in archive headers, and unrecognized ".syso" formats forced external linking in otherwise pure-Go builds, widening the path to the external linker. The fix makes the linker reject ".syso" files that are not recognized host object formats and makes cmd/go and cmd/pack preserve the ".syso" suffix when truncating long archive member names. Exploitation requires the victim to compile a package containing the crafted file (for example via a malicious module dependency or submitted code); no special build flag is needed once the file is present, but the trigger is confined to the build step and does not affect execution of pre-built binaries.
Know when Golang gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
Sources disagree (Medium–Critical)AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Exploitation occurs during local compilation of attacker-supplied code, so AV:L and UI:R (victim must build the package); no attacker privileges needed (PR:N) and build-time code execution yields full C/I/A impact.
vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.
CVSS VectorVendor
Lifecycle Timeline
4Description PRE-NVD
Executive ViewAI
CVE-2026-97040 is a critical vulnerability in the Go toolchain that allows code injection during the build process when compiling attacker-controlled source code containing a malicious .syso file. This affects development teams and CI/CD pipelines that build third-party or untrusted Go code, potentially enabling arbitrary code execution within build environments and compromising software supply chain integrity. Leadership should prioritize patching because exploitation could lead to unauthorized access to build infrastructure and tampering with produced binaries.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot
The net/http package in Go through 1.6 does not attempt to address RFC 3875 section 4.1.18 namespace conflicts and there
Erugo file-sharing platform up to version 0.2.14 has a CVSS 10.0 path traversal allowing authenticated users to read any
Critical certificate validation bypass in Go crypto/tls during session resumption. If ClientCAs or RootCAs fields are mu
WAGO PFC200 G2 PLC (firmware affected) allows privilege escalation through cookie manipulation. Users can modify cookie
Authentication bypass in WeGIA charitable institution management system before 3.6.5. The adicionar_tipo_docs_atendido.p
CGI path splitting vulnerability in FrankenPHP before 1.11.2 — Unicode characters bypass path validation during CGI proc
net/url in Go before 1.11.13 and 1.12.x before 1.12.8 mishandles malformed hosts in URLs, leading to an authorization by
Free5gc NRF 1.4.0 has an authorization bypass in access token generation that allows authenticated users to request toke
Algo 8028 Control Panel version 3.3.3 contains a command injection vulnerability in the fm-data.lua endpoint that allows
Denial of service in PocketBase versions prior to 0.22.48 (0.22.x branch) and 0.23.0 through 0.39.6 (0.23.0+ branch) all
EUVD-2026-123105
NVD
CVE.org
EPSS
VulDB
Exploit-DB