Java4Shell vs Log4Shell: How the Two Java Flaws Compare
Security researchers keep invoking Log4Shell when they talk about Java4Shell. Here is how the two critical Java flaws actually compare, fact by fact.
Short answer: No, Java4Shell (CVE-2026-114938) is not confirmed to be as dangerous as Log4Shell was in 2021. Oracle and Singapore's CSA both score it 8.1 (High) under CVSS 3.1, not Log4Shell's 10.0 (Critical). No security agency has confirmed active in-the-wild exploitation of Java4Shell as of this writing, while Log4Shell was being mass-exploited within days of disclosure. The flaws also live in different places: Java4Shell is a bug in the JVM itself, while Log4Shell was a bug in a third-party logging library. Patch Java4Shell promptly regardless — CISA calls it critical and it can still lead to unauthenticated remote code execution.
Java4Shell went from "patched flaw" to "the next Log4Shell" in security Twitter and vendor blog posts within about 48 hours of Oracle's November 2026 Critical Security Patch Update. The nickname alone tells you the comparison was inevitable: both are critical, both touch an enormous share of enterprise Java infrastructure, and both were disclosed through an urgent CISA bulletin. But a nickname is not a severity rating, and treating the two bugs as equivalent would misread both the official records and the actual risk in front of you.
Here is what the primary sources — Oracle's advisory, the National Vulnerability Database, Apache's own Log4j security page, and CISA's bulletin — actually say about each flaw, and where they disagree.
What Java4Shell actually is
Java4Shell is the informal name for CVE-2026-114938, a memory-corruption vulnerability in the Base64 decoder used by the x86-64 HotSpot Java Virtual Machine. According to the National Vulnerability Database entry, the flaw sits in the Compiler component of Oracle Java SE, Oracle GraalVM for JDK, and Oracle GraalVM Enterprise Edition. NVD describes it as "hard to exploit" but reachable by an unauthenticated network attacker "over multiple protocols," without requiring a malicious Java Web Start application or applet — an attacker can trigger it simply by getting the affected component to decode a crafted Base64 string, for example through a web service. Oracle shipped the fix in its November 2026 Critical Patch Update, alongside 654 other security fixes across its product portfolio.
CISA's bulletin, issued the same week, describes the bug more plainly: specially crafted Base64 input can crash the JVM outright, or in a successful exploitation chain, lead to unauthenticated remote code execution and "full takeover of the affected product." For background on what that class of bug covers more broadly, see our zero-day vulnerability guide — though it's worth noting Java4Shell was disclosed with a patch already available, so it is not itself a zero-day.
What Log4Shell actually was
Log4Shell, tracked as CVE-2021-44228, was a flaw in the JNDI (Java Naming and Directory Interface) lookup feature of Apache Log4j2, the open-source logging library used across a huge share of Java server software. Apache's own security page is blunt about the mechanism: versions 2.0-beta9 through 2.14.1 did not protect against "attacker controlled LDAP and other JNDI related endpoints." Anyone who could get a string into a log message or its parameters — a username field, a User-Agent header, almost anything an application logged — could trigger Log4j2 to fetch and execute code from an attacker-controlled LDAP server.
The fix was simple in hindsight: disable the lookup feature by default, which Apache did in 2.15.0, then remove the vulnerable functionality from the codebase entirely in 2.16.0 after a follow-up bypass (CVE-2021-45046) showed the first fix was incomplete in some non-default configurations.
Where each flaw actually lives
This is the clearest structural difference between the two, and it matters for how you find and fix affected systems. Log4Shell lived in a single third-party library, log4j-core. If your application didn't depend on that one artifact — including applications using only log4j-api — you were not affected, and a dependency scan could tell you exactly where the vulnerable jar sat in your supply chain.
Java4Shell lives one layer deeper: in the JVM runtime itself. CISA's bulletin specifically warns that organizations need to "inventory your systems for JDKs and Java runtimes, including those bundled with third-party applications, container images, and appliances," because a vulnerable JVM might not show up as a distinct entry in a normal software inventory at all. You cannot simply swap out a dependency; you have to find and upgrade every copy of the runtime itself, including ones embedded inside products you didn't build.
How each flaw is triggered
| Java4Shell (CVE-2026-114938) | Log4Shell (CVE-2021-44228) | |
|---|---|---|
| Flaw location | JVM runtime (HotSpot Base64 decoder) | Third-party library (log4j-core) |
| Trigger | Crafted Base64 string decoded by the affected API | Attacker-controlled string reaching a logged JNDI lookup |
| Underlying bug class | Heap memory corruption (CWE-122) | Untrusted deserialization / injection (CWE-502, CWE-917) |
| CVSS 3.1 score | 8.1 High (Oracle / NVD secondary) | 10.0 Critical (NVD primary and secondary) |
| Confirmed active exploitation | None confirmed as of this writing (NVD SSVC: "none") | Mass exploitation within days (NVD SSVC: "active," "automatable") |
| CISA KEV catalog | Not listed at time of writing | Added December 10, 2021, same day as disclosure |
| Primary fix | Oracle's November 2026 Critical Patch Update (patched JDK builds) | Upgrade to Log4j2 2.17.1+ (final fix after two follow-up CVEs) |
The mechanism gap is real: Log4Shell could be triggered by almost any string an application happened to log, which is why it spread so fast once proof-of-concept exploits circulated. Java4Shell requires an attacker to get a specifically malformed Base64 payload into an API that decodes it — NVD's own language, "hard to exploit," reflects that narrower path, even though the eventual impact of a successful exploit is just as severe.
Severity scores: why the numbers don't match the nickname
This is where the "next Log4Shell" framing breaks down most clearly. Log4Shell's CVSS 3.1 score is 10.0, the maximum possible, assigned by both NVD and the CISA coordinator. Java4Shell's CVSS 3.1 score, per Oracle's own secondary rating reflected in NVD's record, is 8.1 — High, not Critical. Singapore's Cyber Security Agency independently published the same 8.1 figure in its November 18, 2026 advisory.
Some early security-vendor writeups cited a CVSS 4.0 score of 9.2 from a third-party researcher group, which would put it closer to Log4Shell territory. We could not verify that 9.2 figure against an official NVD or Oracle record at time of writing, and NVD's published entry for CVE-2026-114938 does not include a CVSS 4.0 score at all — only the 8.1 CVSS 3.1 rating. Readers should treat the 9.2 number as an unconfirmed secondary claim, not an official score, until it appears in Oracle's or NVD's own published advisory.
Exploitation status: is Java4Shell being attacked right now?
NVD's Stakeholder-Specific Vulnerability Categorization (SSVC) data, assigned by the CISA coordinator, lists Java4Shell's exploitation status as "none" and its technical impact as "total" — meaning a successful exploit would be severe, but no confirmed exploitation has been observed yet. That matches CISA's own bulletin, which frames the advisory as preventive: patch now, before exploitation starts, rather than as an active-incident response.
Log4Shell's SSVC record, by contrast, lists exploitation as "active" and the flaw as "automatable." Within days of the December 2021 disclosure, mass internet-wide scanning and exploitation attempts were already underway, which is part of why it was added to CISA's Known Exploited Vulnerabilities catalog on the very day it was disclosed. As of this writing, Java4Shell has not been added to the KEV catalog, which specifically tracks vulnerabilities with confirmed real-world exploitation.
None of that is a reason to delay patching. "Not yet exploited" is a snapshot, not a guarantee, and a flaw this capable — unauthenticated, network-reachable, full takeover on success — is exactly the profile that attracts exploit development once a patch (and the diffing that follows it) is public.
Affected versions and blast radius
Per Oracle's data reflected in the NVD record, Java4Shell affects Oracle Java SE builds including 8u511b33-perf, 17.0.21.0.3, 21.0.13.0.3, 25.0.5.0.3, and 27.0.1.0.3, plus corresponding GraalVM for JDK and GraalVM Enterprise Edition builds. Downstream, NVD's configuration data lists Red Hat's build of OpenJDK, Amazon Corretto 27, and a long list of Red Hat middleware products (including JBoss EAP, Data Grid, and Streams for Apache Kafka) as affected through their own bundled JDKs, alongside Siemens industrial products that ship Java runtimes. Because the bug lives in the runtime rather than an application dependency, the real affected list is almost certainly larger than any single vendor's advisory — which is exactly why CISA's bulletin leads with an inventory step rather than a patch link.
Log4Shell's blast radius, by comparison, was defined by a dependency graph: any product bundling a vulnerable log4j-core jar, directly or transitively. NVD's record for CVE-2021-44228 lists vulnerable configurations spanning Cisco, Siemens, Intel, NetApp, and dozens of other vendors' products, plus Debian and Fedora Linux distributions — a sprawl that took the industry months to fully map via tools like CISA's own community-maintained affected-software list.
How to patch and protect yourself right now
For Java4Shell, CISA's bulletin recommends, in order: inventory every JDK and Java runtime you run — including ones bundled inside third-party applications, container images, and appliances, since these often don't show up as separate line items in software inventories; apply Oracle's patched builds as soon as possible, prioritizing internet-facing systems; and if you cannot patch immediately, add compensating controls such as validating and restricting Base64 input at the application boundary, enforcing input-size limits, and limiting unauthenticated access to the affected APIs. Canada's Canadian Centre for Cyber Security has additionally suggested the JVM startup flag that disables the vulnerable intrinsic as a stopgap where patching isn't immediately feasible — treat that as a temporary measure, not a substitute for the real patch.
If you're also dealing with other recent critical disclosures in your Java stack, our coverage of Apache's mod_http2 RCE patch and the original Java4Shell patch announcement walk through the specific fixed builds and version numbers you should be checking against your inventory.
The verdict: serious, but not a repeat of Log4Shell
Java4Shell deserves urgent patching — CISA's language, "critical" and "immediate," is not hedged, and an unauthenticated, network-reachable, full-takeover bug in the JVM itself is about as structurally dangerous as a vulnerability class gets. But by every number currently on the record — an 8.1 CVSS score instead of 10.0, no confirmed active exploitation instead of mass exploitation within days, and no KEV catalog listing — Java4Shell has not reached the severity or exploitation level Log4Shell did in December 2021. The shared nickname reflects how both bugs threaten a huge swath of enterprise Java infrastructure through a near-ubiquitous component, not that the two are equally severe or equally urgent in the same way.
What to do next
Run an inventory of every JVM and JDK in your environment, including ones bundled inside third-party software and containers. Cross-check each one against Oracle's November 2026 Critical Patch Update advisory for your specific product line and platform. Patch internet-facing systems first, apply compensating input-validation controls anywhere you can't patch immediately, and keep watching CISA's and NVD's records for this CVE — both the exploitation status and the affected-version list could still be updated as more vendors publish their own advisories.
Frequently asked questions
Is Java4Shell as dangerous as Log4Shell?
Not based on the current public record. Log4Shell scored a maximum 10.0 CVSS 3.1 (Critical) and was mass-exploited within days of disclosure. Java4Shell (CVE-2026-114938) is scored 8.1 (High) by Oracle and Singapore's CSA, and no security agency has confirmed active exploitation yet. Both are serious and both demand prompt patching, but Java4Shell has not reached Log4Shell's severity or exploitation level as of this writing.
What is CVE-2026-114938?
It's the formal identifier for Java4Shell, a memory-corruption vulnerability in the Base64 decoder of the x86-64 HotSpot JVM, affecting Oracle Java SE, GraalVM for JDK, and GraalVM Enterprise Edition. A specially crafted Base64 string can crash the JVM or, in a successful exploitation chain, lead to unauthenticated remote code execution.
Is Java4Shell being exploited in the wild right now?
No confirmed exploitation has been reported. NVD's SSVC data, assigned by the CISA coordinator, lists exploitation status as "none," and Canada's Canadian Centre for Cyber Security says it is not aware of active exploitation. It has also not been added to CISA's Known Exploited Vulnerabilities catalog, which tracks confirmed real-world exploitation.
Which Java versions are affected by Java4Shell?
Per Oracle's advisory data reflected in the NVD record, affected builds include Oracle Java SE 8u511b33-perf, 17.0.21.0.3, 21.0.13.0.3, 25.0.5.0.3, and 27.0.1.0.3, plus matching GraalVM for JDK and GraalVM Enterprise Edition builds. Downstream products bundling an affected JDK, including Red Hat's build of OpenJDK and Amazon Corretto 27, are also affected. Check Oracle's own advisory and your vendor's advisory for your exact build.
What should I do if I can't patch immediately?
CISA recommends validating and restricting Base64 input at the application boundary, enforcing input-size limits, and limiting unauthenticated access to affected APIs. Canada's Canadian Centre for Cyber Security has suggested a JVM startup flag that disables the vulnerable intrinsic as an additional stopgap. Treat both as temporary measures, not substitutes for patching.
Does Java4Shell affect Log4j or other logging libraries?
No. Java4Shell is a flaw in the JVM runtime itself, not in Log4j or any other third-party library. Log4Shell (CVE-2021-44228) was specific to Apache Log4j2's log4j-core artifact and does not relate to Java4Shell's cause or fix.
Sources
- NVD: CVE-2026-114938 (Java4Shell) recordnvd.nist.gov
- CISA Bulletin: Critical Java Vulnerability Requires Immediate Patchingcontent.govdelivery.com
- NVD: CVE-2021-44228 (Log4Shell) recordnvd.nist.gov
- Apache Log4j Security Vulnerabilities pagelogging.apache.org
Sana Qureshi runs the security and privacy desk. She reports on actively exploited vulnerabilities, vendor patches and data breaches, and covers the password managers, VPNs and authentication tools readers use to protect themselves. Her alerts cite vendor advisories, CISA and the CVE record directly.
