🛡️ 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

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 storeNo (and it is not your server)
A site built with JavaScript, React, Node.jsNo
Android apps on your phoneNo: Android does not use this Java
A server running Tomcat, Jenkins, Jira, Confluence, Keycloak, Elasticsearch, Solr, Kafka, business software or a Minecraft server in JavaMaybe: check (section 3)
Business or point-of-sale software "in Java" installed on your premisesMaybe: ask the vendor

The three conditions

A machine is exposed only if it meets all three:

  1. An affected Java version:
Java branchAffected versions (Oracle)Fixed version (Oracle)
Java 17from 17.0.6 to 17.0.21.0.317.0.21.1
Java 21up to 21.0.13.0.321.0.13.1
Java 25up to 25.0.5.0.325.0.5.1
Java 27up to 27.0.1.0.327.0.1.1
Java 8only the "Performance Pack" edition (8u511b33-perf)8u513-perf
Java 11, standard Java 8not 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.

  1. 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.
  1. 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

4. Fix it

Update Java

Where the fixes stand (checked on 18 and 19 November 2026):

VendorStatus
Oracle Java SEFixed (versions in the table above)
Amazon Linux and Amazon CorrettoFixed (Corretto 17.0.21.1.2 and later)
Red Hat, AlmaLinux, RockyNot yet: Red Hat says it is speeding up the release of fixes
Debian, UbuntuNot yet: no fixed version listed as of 18 November
Azul Zulu, BellSoft Liberica, Eclipse TemurinConflicting 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:

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:

The full check took less than ten minutes.

Checklist

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

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.

← All guides

← All guides