Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious binary with negative-shift p-code
-
DeliveryDeliver sample to analyst (bait/supply chain)
-
ExploitAnalyst loads and runs decompiler
-
Executionleftshift128 out-of-bounds write on stack
-
ImpactCorrupt memory, potential code execution as analyst
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation 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 open an attacker-supplied binary in Ghidra (versions through 12.1.4) and invoke the decompiler on it; the binary must contain a specific instruction sequence that lowers to p-code with a negative shift amount reaching the leftshift128 function via the RuleDivOpt/RuleDivTermAdd decompiler rules. Limiting factors: the attack is local (the malicious file must be present on the analyst's machine, AV:L), requires user interaction (loading and decompiling the sample, UI:P), and depends on the crafted p-code reaching the vulnerable divisor-optimization code path (AT:P). There are no authentication or special configuration prerequisites - Ghidra's default decompiler behavior is sufficient - but the workflow gating makes this a targeted-analyst threat rather than a broadly exploitable one. |
| Impact | This is a real but interaction-gated issue, not a critical remote flaw. The CVSS 4.0 vector (AV:L/AC:L/AT:P/PR:N/UI:P) is internally consistent with the description: exploitation requires a local vector (a malicious binary present on the analyst's machine), user interaction (the analyst must load and decompile it), and an attack requirement (AT:P - a specific crafted instruction sequence must reach the vulnerable leftshift128/RuleDivOpt code path). Technical impact is high (VC:H/VI:H/VA:H) because memory corruption of the decompiler process can potentially yield code execution in the analyst's user context. No EPSS score, no CISA KEV entry, and no public POC are present in the input - the VulnCheck reference is a vendor-style advisory, not exploit code, so exploitation status is 'no public exploit identified at time of analysis.' The primary risk is a targeted attack against reverse engineers/malware analysts who open attacker-supplied samples - a plausible tradecraft angle given Ghidra's audience - but the double gate of local-file + user-interaction keeps real-world mass exploitation unlikely. Missing signal: no EPSS/KEV data to gauge exploitation likelihood; the code-execution outcome is described as 'potential,' so weaponized RCE is inferred from the OOB write, not confirmed. |
| Exploit ScenarioDerived | An attacker distributes a malicious executable containing a carefully crafted instruction sequence that decompiles into p-code with a negative shift amount reaching leftshift128. When a reverse engineer opens the sample in Ghidra (≤12.1.4) and runs the decompiler, the stack-based out-of-bounds write corrupts memory in the decompiler process and can potentially execute code in the analyst's user context. No public POC is identified at this time; the flaw was reported by VulnCheck and patched by the vendor. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 26, 2026
Decompiling a maliciously crafted binary with Ghidra through 12.1.4 can drive a stack-based out-of-bounds write inside the decompiler's leftshift128 routine, letting the sample corrupt process memory and potentially achieve code execution in the analyst's Ghidra session. The flaw is triggered when a specific instruction sequence lowers to p-code containing a negative shift amount that reaches the RuleDivOpt/RuleDivTermAdd divisor-optimization path; no privileges are required (PR:N in both the reported CVSS 4.0 vector and the independent CVSS 3.1 assessment), but exploitation is gated on the victim loading and decompiling the attacker-supplied file (UI:P/UI:R), making this a targeted threat against reverse engineers rather than a remote one. At the time of analysis, no public exploit code has been identified for this issue and there is no confirmed active exploitation (CISA KEV status is not present).
RemediationAI
The primary fix is the upstream Ghidra commit 6babe3c1cec7f5ec920dd16cdc86a02893e5b33c, which hardens the affected shift handling by changing the shift/size parameters from int4 to uint4 in ruleaction.cc/.hh and rejecting shift counts greater than 127 in RuleDivTermAdd2::applyOp; the vendor describes a patch as available, but since the reference is a source commit rather than a tagged release, the specific first patched Ghidra version is not independently confirmed here - upgrade to the earliest Ghidra release that contains this commit and consult https://github.com/NationalSecurityAgency/ghidra and https://www.vulncheck.com/advisories/ghidra-through-12.1.4-stack-based-buffer-overflow-via-leftshift128 for confirmation. If upgrading is not possible, compensate for the interaction-gated nature of the bug: decompile untrusted or attacker-supplied samples only inside a disposable sandbox, container, or VM running as an unprivileged user with no access to host secrets, which limits the blast radius of a successful memory corruption but does not prevent the write itself; avoid batch-decompiling untrusted corpora on analyst workstations or CI runners that hold credentials, accepting the operational cost of slower, staged triage (first pass with static/lightweight tooling, decompilation only after samples are trusted or sanitized); and restrict Ghidra process privileges (no debugger attach rights, no network egress) so that code execution in the decompiler session cannot be chained into lateral movement. Note that the fix bounds shift counts rather than disabling the RuleDivOpt optimization, so patched builds retain full decompiler functionality without configuration changes.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability is a CWE-787 out-of-bounds write rooted in signed/unsigned integer handling in Ghidra's C++ decompiler core. Ghidra's decompiler lifts machine instructions into p-code, a RISC-like intermediate language, then applies optimization rules to simplify it. In Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc, the RuleDivOpt and RuleDivTermAdd rules inspect shift/subpiece operations to reconstruct division idioms; offset and shift counts were carried in signed int4 variables and handed to the multiprecision helpers. The leftshift128 routine referenced in multiprecision.cc assumes a valid 128-bit shift amount, so a negative shift amount derived from crafted p-code causes the routine to write outside its fixed 128-bit stack destination rather than being rejected up front. The upstream fix (commit 6babe3c1cec7f5ec920dd16cdc86a02893e5b33c) converts these shift/size parameters from int4 to uint4 across ruleaction.cc/.hh and adds an explicit guard in RuleDivTermAdd2::applyOp - 'if (n > 127 || n != 8*(subpieceop->getIn(0)->getSize() - z->getSize())) return 0;' - so out-of-range shift counts are discarded before they reach the 128-bit shift logic. The affected CPE is cpe:2.3:a:nationalsecurityagency:ghidra:*:*:*:*:*:*:*:*, i.e. the NSA-maintained Ghidra distribution up to and including 12.1.4.
Know when Ghidra 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
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Local because a malicious file must be opened (AV:L), analyst must decompile it (UI:R), no auth needed (PR:N), and memory corruption enables potential full code execution in the user context (C/I/A:H).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
Ghidra versions through 12.1.4 contain a stack-based out-of-bounds write vulnerability in the decompiler's leftshift128 function when processing negative shift amounts from p-code. Attackers can craft malicious binaries with specific instruction sequences that trigger the overflow when decompiled, corrupting memory and potentially achieving code execution.
Executive ViewAI
Ghidra, the reverse-engineering platform used by our security and malware-analysis teams, is affected by a HIGH-severity memory-corruption flaw (CVE-2026-100504, CVSS 7.3) that can let an attacker run code inside an analyst's Ghidra session when that analyst decompiles a maliciously crafted binary. Scanning and reverse-engineering staff are the affected population, and the impact is concentrated on their workstations, which routinely hold sensitive malware samples, analysis data, and potentially privileged credentials. No public exploit code or confirmed active exploitation has been identified at time of analysis, and a vendor patch is available, so this is a targeted patching-discipline risk rather than an active incident.
Apply vendor patch. Until the patched release is deployed on every host: decompile untrusted or externally sourced samples only in disposable, network-isolated VMs with no corporate credentials or production access; run Ghidra under a least-privilege account; restrict where samples can be sourced from; and monitor analysis hosts for unexpected child processes or outbound network connections.
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
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Ghidra/RuntimeScripts/Linux/support/launch.sh in NSA Ghidra through 10.2.2 passes user-provided input into eval, leading
NSA Ghidra through 9.0.4, when experimental mode is enabled, allows arbitrary code execution if the Read XML Files featu
NSA Ghidra before 9.0.1 allows XXE when a project is opened or restored, or a tool is imported, as demonstrated by a pro
NSA Ghidra before 9.0.2 is vulnerable to DLL hijacking because it loads jansi.dll from the current working directory. Ra
In NSA Ghidra before 9.1, path traversal can occur in RestoreTask.java (from the package ghidra.app.plugin.core.archive)
Command injection in NSA Ghidra (versions before 12.0.3) executes arbitrary commands when analysts click on maliciously
SQL injection in Ghidra's BSim binary-similarity component (versions before 12.1) allows authenticated remote attackers
Authentication bypass in NSA Ghidra versions prior to 12.1 allows any holder of a valid CA-signed certificate to imperso
SQL injection in Ghidra's PostgreSQL collaboration backend (versions 11.0 through pre-12.1) allows authenticated users t
Remote code execution in NSA Ghidra before version 12.1 allows attackers to execute arbitrary commands when a user opens
Command injection in Ghidra versions before 12.1 on Windows allows attackers to execute arbitrary OS commands under the
Arbitrary file write in NSA's Ghidra reverse-engineering framework before version 12.0.4 allows attackers to escape the
EUVD-2026-87373
GHSA-m3q7-8jjf-cmcw
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB