GHSA-qxq7-88pj-2ph7
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPublish malicious cgo Go module
-
DeliveryVictim fetches and builds it on Darwin
-
ExploitCrafted #cgo LDFLAGS recombine into -lto_library
-
ExecutionApple linker loads attacker-supplied LTO plugin dylib
-
ImpactArbitrary code execution on build host
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Argument sanitization
|
| Exploitation Conditions | Exploitation requires all of the following concrete conditions: (1) the victim builds an attacker-controlled Go package that uses cgo (CGO_ENABLED), (2) the build runs on Darwin/macOS, and (3) the Apple linker (ld) is used, which performs the '-l'/'to_library' argument recombination into '-lto_library'. The malicious input is a '#cgo LDFLAGS' directive crafted to inject disallowed linker flags that load an arbitrary LTO plugin dynamic library. Limiting factors that reduce real-world risk: UI:R means the victim must actively fetch and build the untrusted module (a supply-chain precondition, not passive exposure); the flaw is specific to macOS with the Apple linker and does not affect Linux or other linkers; cgo must be enabled; and non-Darwin or non-Apple-linker builds are not affected. Updating to a fixed Go toolchain is the only complete remediation per the vendor. |
| Impact | CVSS 3.1 base score is 8.8 (High) with vector AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, reflecting full confidentiality, integrity and availability loss via arbitrary code execution - but the UI:R flag is doing heavy lifting: exploitation requires a victim to fetch and build an attacker-controlled Go package, so this is a supply-chain/build-time risk rather than a directly network-reachable service flaw. The non-severity signals temper urgency: EPSS is only 0.25% (17th percentile), the CVE is NOT listed in CISA KEV, and no confirmed working exploit code is present in the input - only vendor and oss-security advisories. The vuln.today decision label is 'this_week' (priority, not emergency), consistent with a patch-available, not-actively-exploited issue. Net assessment: a genuine high-severity code-execution bug for the specific population that builds untrusted cgo code on macOS, but not a drop-everything mass-exploitation event; the low EPSS and absence of KEV/PoC argue for prompt patching within normal cycles rather than emergency response. Note the C:H/I:H/A:H rating assumes execution in the developer/CI build context - blast radius depends on the privileges of the account running 'go build'. |
| Exploit ScenarioDerived | An attacker publishes a malicious Go module containing a '#cgo LDFLAGS' directive with '-l to_library <path>'; the Apple linker on Darwin recombines the split '-l' and 'to_library' tokens into '-lto_library', causing it to load an attacker-controlled LTO plugin dynamic library at link time. When a macOS developer or CI pipeline fetches and builds this module with cgo enabled, arbitrary code runs on the build host. No public working exploit is identified in the input, though the mechanism is fully described in the Go advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Nov 16, 2026
Arbitrary code execution at build time on macOS: when the Go command builds a cgo package, a crafted '#cgo LDFLAGS' directive can pass the separated tokens '-l' and 'to_library' to the Apple linker, which recombines them into '-lto_library' and loads an attacker-supplied LTO plugin dynamic library during linking. The flaw affects cmd/go releases before 1.26.11 and 1.27.x releases before 1.27.4 and is only reachable when a victim fetches and builds an attacker-controlled cgo package on Darwin with the Apple linker (UI:R), making this a build-time supply-chain risk rather than a directly reachable service flaw. Vendor patches are available, EPSS is 0.25% (17th percentile), and no public exploit code or CISA KEV entry was identified at time of analysis.
Earlier versions of this analysis (1)
Risk cannot be meaningfully quantified from the supplied data. CVE-2026-97036 is one of twelve identifiers published in the Go team's pre-announcement for the Go 1.27.4 and Go 1.26.11 security releases, and the pre-announcement deliberately contains no per-CVE detail: the affected standard library package, runtime subsystem or toolchain area is not identified, and no impact statement, CVSS score, CWE or CPE mapping is available. There is no KEV listing and no public exploit code identified at time of analysis, no EPSS score was supplied, and the vuln.today priority label is awaiting_data, so severity and exploitability should be treated as unknown rather than low until the individual advisory and release notes are published.
RemediationAI
Upgrade to a fixed Go toolchain: 1.26.11 or later on the 1.26 branch, or 1.27.4 or later on the 1.27 branch, per https://pkg.go.dev/vuln/GO-2026-6855 and https://go.dev/issue/82574; the vendor states that updating the toolchain is the only complete remediation, since the hardening lives in the go command's handling of '#cgo LDFLAGS' and of recombined '-l' arguments. Because the patched go command is what blocks the malicious directive, patching the toolchain on Darwin build hosts (including CI runners and developer Macs) matters more than patching the packages being built. Where an immediate upgrade is not possible, reduce exposure by auditing and pinning third-party modules that carry '#cgo LDFLAGS' before building them on macOS, with the trade-off of manual review overhead and no runtime enforcement; alternatively, perform builds of untrusted cgo modules on non-Darwin hosts or with non-Apple linkers, or set CGO_ENABLED=0 for those builds, accepting that cgo-dependent packages will then fail to build. These are compensating controls only and do not replace the fixed toolchain.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 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
cgo lets Go packages embed C/C++ toolchain options through directives such as '#cgo LDFLAGS', whose contents the go command forwards to the external linker. This is a CWE-88 argument-injection flaw: on Darwin, where the Apple linker (ld) is used, the driver emits '-l' and 'to_library' as separate arguments, and the Apple linker rejoins adjacent tokens so they are parsed as the single flag '-lto_library', causing an arbitrary LTO plugin dynamic library at an attacker-chosen path to be dlopen'd at link time with the privileges of the building user. The issue is specific to Darwin with the Apple linker; Linux and other linkers do not perform this recombination, and cgo must be enabled for the directive to be processed, so non-cgo and non-Darwin builds are not affected. The upstream fix hardens the go command itself: it now disallows '-l' followed by 'to_library' inside '#cgo LDFLAGS', rejects '-lazy_library', '-lazy_framework', '-load_hidden', '-library' and '-library-path', and re-checks recombined '-l' arguments against a list of disallowed linker flags and patterns (go.dev/issue/82574, go.dev/cl/862149, GO-2026-6855).
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
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
AV:N and PR:N because the attacker publishes a remotely-fetched package without authentication; UI:R because the victim must build it; C/I/A:H from arbitrary code execution on the build host.
Primary rating from Vendor (CNA).
CVSS VectorVendor
Lifecycle Timeline
4Description PRE-NVD
Executive ViewAI
CVE-2026-97036 enables arbitrary code execution during builds of cgo packages on macOS, potentially compromising developer workstations and the software supply chain. This high-severity flaw primarily affects engineering teams using Go with Apple's linker, allowing attackers to execute malicious code when building untrusted packages, which could lead to data breaches or intellectual property theft.
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
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-123109
NVD
CVE.org
EPSS
VulDB
Exploit-DB