🛡️ Critical Java vulnerability (Java2Shell / Java4Shell): how to tell if you are affected and protect yourself
🌐 Français · English · العربية
A serious flaw in Java can let an attacker make a server run code, without any credentials. Yet it only affects some machines. Here is how to check safely, in a few minutes, whether you are affected, and what to do while you wait for the fix.
Updated: 19 November 2026
In short
- On 17 November 2026, Oracle fixed a Java flaw (CVE-2026-114938), nicknamed "Java4Shell" or "Java2Shell". Oracle rates it 8.1 out of 10 and the researcher who found it rates it 9.2 out of 10.
- Java is not JavaScript: a WordPress site, a Shopify, YouCan or WooCommerce store, or a JavaScript site is not affected.
- Three conditions must all be met: an unpatched Java 17, 21, 25 or 27, a recent processor with the AVX-512 VBMI instruction, and a running Java program that receives data from outside.
- As of this guide, no real-world attack has been reported, but fixes are not arriving at the same pace from every vendor: Red Hat and its derivatives (AlmaLinux, Rocky) have not released one yet.
- In the meantime, a Java startup option recommended by Red Hat closes the door. This guide explains how to apply it and check that it is active.
1. What happened
On 17 November 2026, Oracle released a Java security update that fixes the CVE-2026-114938 flaw. A researcher (Calif) then published the technical details and gave it its nickname, "Java4Shell", by analogy with Log4Shell, the Java flaw that made headlines in 2021. It is also known as "Java2Shell".
What the problem is, without technical detail: to go faster, Java uses, on some recent processors, an accelerated version of its function that decodes Base64, an encoding format used everywhere on the web (authentication headers, login tokens, uploaded files…). With a deliberately malformed Base64 text, this accelerated version writes outside the memory area it is supposed to use. According to the researcher, an attacker can use this to read memory, then make the server run code.
What the researcher says: he claims to have taken control, without credentials and in their default configuration, of software widely used in companies such as Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate. He has not published his attack code.
The two severity ratings: Oracle rates the flaw 8.1 out of 10 (CVSS 3.1), because the attack is complex to pull off. The researcher rates it 9.2 out of 10 (CVSS 4.0).
Key point. The flaw is not in your site, but in Java itself. It therefore only concerns machines that run Java programs.
2. Java is not JavaScript: who is really affected?
The names look alike, but they are two unrelated technologies.
| You have… | Affected? |
|---|---|
| A WordPress, WooCommerce or Prestashop site (PHP) | No |
| A Shopify, YouCan or Wix store | No (and it is not your server) |
| A site built with JavaScript, React, Node.js | No |
| Android apps on your phone | No: Android does not use this Java |
| A server running Tomcat, Jenkins, Jira, Confluence, Keycloak, Elasticsearch, Solr, Kafka, business software or a Minecraft server in Java | Maybe: check (section 3) |
| Business or point-of-sale software "in Java" installed on your premises | Maybe: ask the vendor |
The three conditions
A machine is exposed only if it meets all three:
- An affected Java version:
| Java branch | Affected versions (Oracle) | Fixed version (Oracle) |
|---|---|---|
| Java 17 | from 17.0.6 to 17.0.21.0.3 | 17.0.21.1 |
| Java 21 | up to 21.0.13.0.3 | 21.0.13.1 |
| Java 25 | up to 25.0.5.0.3 | 25.0.5.1 |
| Java 27 | up to 27.0.1.0.3 | 27.0.1.1 |
| Java 8 | only the "Performance Pack" edition (8u511b33-perf) | 8u513-perf |
| Java 11, standard Java 8 | not affected | – |
Branches 18 to 20, 22 to 24 and 26 no longer receive fixes: if you still use them, you need to move to a maintained branch.
- A processor with the AVX-512 VBMI instruction: this is the case for Intel server processors from the Ice Lake generation onwards and AMD processors from Zen 4 onwards (for example AMD EPYC 9004). Older processors, machines that only have AVX2, and ARM processors (AWS Graviton, Apple Silicon) take a different path, which is not affected.
- A running Java program that receives data from outside: a website, an API, an internal tool reachable from the network. The flaw only appears once the accelerated version of the decoder has been activated through use, which happens quickly on an active service.
3. How to check if your server is affected
These commands only read information: they change nothing and carry no risk. On a Linux server, connect over SSH.
Which Java version?
java -version
Which Java packages are installed?
# AlmaLinux, Rocky, Red Hat
rpm -qa | grep -i openjdk
# Debian, Ubuntu
dpkg -l | grep -i openjdk
Does the processor have the instruction in question?
grep -o -m1 -w avx512vbmi /proc/cpuinfo || echo "instruction missing: processor not affected"
If the command displays avx512vbmi, the processor is affected.
Are any Java programs running right now?
ps -eo pid,user,args | grep -i '[j]ava'
If this command displays nothing, no Java program is running: even with an affected version, the server is not exposed as long as nothing starts Java.
Watch out for "hidden" Java installs: many applications ship their own Java (Jira, Elasticsearch, some business applications), and Docker containers each have their own. The java -version command does not show them. For each important Java application, check which Java version it uses in its own documentation or administration page.
A trap with version numbers: Linux distributions number their packages their own way. For example, Red Hat and AlmaLinux show "17.0.21.0.9" for a Java 17 that does not yet contain the fix. Rely on your distribution's security advisory, not just on the number.
What not to do
- Do not run a "demonstration" found on the internet to test your server. The current public code mostly crashes Java, which takes your service down. Some repositories may even be booby-trapped.
- Do not confuse a "safe" processor with a safe machine: with a cloud provider, your server can be moved to a newer machine with an affected processor.
4. Fix it
Update Java
Where the fixes stand (checked on 18 and 19 November 2026):
| Vendor | Status |
|---|---|
| Oracle Java SE | Fixed (versions in the table above) |
| Amazon Linux and Amazon Corretto | Fixed (Corretto 17.0.21.1.2 and later) |
| Red Hat, AlmaLinux, Rocky | Not yet: Red Hat says it is speeding up the release of fixes |
| Debian, Ubuntu | Not yet: no fixed version listed as of 18 November |
| Azul Zulu, BellSoft Liberica, Eclipse Temurin | Conflicting information: check the vendor's website |
As soon as your vendor releases the fix:
# AlmaLinux, Rocky, Red Hat
sudo dnf update 'java-*-openjdk*'
# Debian, Ubuntu
sudo apt update && sudo apt install --only-upgrade 'openjdk-*'
Restart every Java program: the step everyone forgets
Updating the package is not enough: until a Java program has been restarted, it keeps using the old version. Restart every Java service (Tomcat, Jenkins, Elasticsearch…) after the update, then check with ps that it really did restart.
5. Protect yourself while waiting for the fix
Red Hat recommends a Java startup option that disables the faulty accelerated version:
-XX:-UseBASE64Intrinsics
This is Red Hat's "preferred" option. It may slightly slow down Base64 decoding, with no other visible effect. An alternative exists (-XX:UseAVX=2), but it should be kept for x86 processors: on an ARM server, Java then refuses to start.
Where to add it? In each application's Java options, in the same place as its other Java memory settings. Depending on the application, this is often the JAVA_OPTS variable, a setenv.sh file (Tomcat) or a jvm.options file (Elasticsearch). Follow your application's documentation. For programs started directly with the java command, the JDK_JAVA_OPTIONS environment variable is read at startup.
Then check that the option is really active, because what counts is the running program, not the configuration file:
jcmd <Java process ID> VM.flags -all | grep -F UseBASE64Intrinsics
The expected result is bool UseBASE64Intrinsics = false. The process number is the one given by the ps command in section 3.
Remember to remove this option once the fix is installed and the service restarted.
6. Was I attacked?
To date, no real-world attack has been reported and the flaw is not on the list of exploited vulnerabilities kept by the US agency CISA (checked on 18 November 2026). A few signs still deserve your attention:
- unexplained Java crashes: recent
hs_err_pid*.logfiles in the application's folder; - unexpected programs started by Java (visible with
ps -ef --forest); - many "Input byte array has wrong 4-byte ending unit" messages in the application logs. This sign remains generic: it can come from a simple input error.
None of these signs proves an attack. If you have serious doubts, have the server examined by a professional.
7. What I did on my own server
I applied this guide's method to the server that hosts my sites:
- Java installed: yes, the distribution's Java 17 (AlmaLinux), within the affected range.
- Processor: a Zen 4 generation AMD EPYC, which has the instruction in question.
- Running Java programs: none. Java is only used to build Android apps from my own code, a few minutes at a time. Nothing reachable from the internet.
- Decision: the risk is very low. The server's automatic security updates will install the fix as soon as AlmaLinux releases it, and I will then check that it is in place.
The full check took less than ten minutes.
Checklist
- [ ] I checked whether I really use Java (and not just JavaScript or PHP)
- [ ] I noted the Java version and the processor type of each server
- [ ] I listed the running Java programs, including those that ship their own Java and containers
- [ ] I applied the
-XX:-UseBASE64Intrinsicsoption to exposed services and checked withjcmdthat it is active - [ ] I am following my vendor's or my distribution's security advisory
- [ ] As soon as the fix is released: update, restart every Java service, remove the option
FAQ
Is my WordPress site affected by Java2Shell?
No. WordPress runs on PHP, not Java. For PHP, another critical flaw was fixed in October: see our PHP2Shell guide.
Java is installed on my computer, should I worry?
The risk is low as long as no Java program on your computer receives data from the internet. Update Java as soon as the fixed version is offered, or uninstall it if you do not use it.
My processor does not have the AVX-512 VBMI instruction, am I safe?
For this flaw, yes. But still update Java when the fix is available: with a hosting provider, your server can change machines, and the update also fixes other flaws.
Why two names, Java4Shell and Java2Shell?
The researcher called it "Java4Shell", in reference to Log4Shell. The name "Java2Shell" is also going around, perhaps by analogy with PHP2Shell. It is the same flaw: CVE-2026-114938.
Does the -XX:-UseBASE64Intrinsics option slow down my service?
It only disables the acceleration of Base64 decoding. For most services, the effect is negligible. It should be removed once the fix is installed.
Sources
- Red Hat, bulletin RHSB-2026-018 (updated on 18 November 2026)
- JFrog Security Research, Java4Shell (17 November 2026)
- PenTestIT, Java4Shell: exposure, fixes and detection (18 November 2026)
- Astra Security, CVE-2026-114938 advisory
- SecureLayer7, what is Java2Shell?
Need help?
I can check your server, apply the protections while you wait for the fix, then set up reliable automatic security updates. See the maintenance and hosting service or get in touch.