DEV Community

Cover image for Java4Shell CVE-2026-114938: Check, Patch, Mitigate
devTalk
devTalk

Posted on Originally published at dev-talk.com

Java4Shell CVE-2026-114938: Check, Patch, Mitigate

Last updated: 21 November 2026. Facts about the flaw and the observed attacks come from the sources listed at the end; the version, CPU and workaround checks were run on Ubuntu 24.04 with OpenJDK 17 and 21. The situation is moving quickly, so seeHow this was checked.

Java4Shell is a memory-corruption bug in the Java runtime's Base64 decoder, disclosed on 17 November 2026. Within a day, security vendors were reporting exploit attempts. One report, from Cloudflare's Cloudforce One, describes an address that probed a target under a user agent that gave the scanning tool away, then came back about 17 hours later with an exploit attempt claiming to be Chrome. Headlines turned that into "hackers using ARTEX disguise themselves as Chrome". The evidence is narrower than that, and it matters for what you should do, so this article separates what is established from what is not, then covers how to check, patch and mitigate.

The short version

  • The flaw: a heap out-of-bounds write in the x86-64 Base64 decoding routine that HotSpot uses (an "intrinsic"). It is reached only on CPUs with AVX-512 VBMI, and ARM64 does not use the vulnerable path.
  • Affected: reported as OpenJDK 17.0.6 and later, across vendors (Oracle, Temurin, Corretto, Microsoft, Azul, Red Hat). Oracle's own advisory lists more release lines.
  • Fixed: Oracle and OpenJDK released patched builds on 17 November. Examples: 17.0.21.1 and 21.0.13.1.
  • Exploitation: scanning and exploit attempts are reported. Confirmed compromises are not.
  • The "Chrome disguise": a spoofed User-Agent header. Anyone can set it to anything, so it is a detail to note, not a signature to block.

What the flaw is

Per the research and vendor write-ups (Calif, Group-IB, Picus, BleepingComputer), Java4Shell is CVE-2026-114938, a heap out-of-bounds write in the Base64 intrinsic that the C2 JIT compiler uses on x86-64. Malformed Base64 input can write past the end of a heap array. Calif says it got unauthenticated remote code execution in default configurations of Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate, and authenticated RCE in Kafka, Solr, Elasticsearch, Gerrit and Spinnaker. It has not released the weaponized chains. A proof of concept for the memory corruption is public.

Three things to keep straight:

  • It is a runtime bug, not a library bug. Dependency scanners that look at your pom.xml or package-lock.json will not find it. Datadog, as quoted on Cloudflare's tracking page, says the bug is reached before the application can reject the input, so validating input in your code does not help.
  • It is not one universal exploit. The attacker needs an application-specific way to get Base64 data into the decoder, and for RCE, per OX Security, must manipulate heap layout and defeat ASLR for each target. OX estimates under 0.12% of JVM instances are exposed to RCE and about 0.8% to crashes. Treat those as one vendor's estimate.
  • Scores differ. Calif rates it 9.2 (CVSS 4.0). Oracle rates its Java SE fixes up to 8.1 (CVSS 3.1). Different scoring systems, and Cloudflare's page notes the two may describe different things.

What was observed, and what was not

Cloudflare's Cloudforce One reported that a source IP scanned a target with a User-Agent that revealed the scanning tool, then about 17 hours later sent an exploit attempt to the same target, this time claiming to be Chrome. In a separate 18 November post it said that for the first time it had seen traffic linked to both ARTEX and Java4Shell from one IP address. watchTowr separately reported that its honeypots were being hit with requests carrying a java4shell-recon User-Agent and with blind exploitation attempts.

The Cybersecurity News write-up is explicit about the limits. The reports do not establish that ARTEX sent the Chrome-disguised request, that either attempt led to a breach, or that a shared IP means a common operator. The disguise was in the HTTP User-Agent header, not in Chrome.

What ARTEX is

Per the FBI FLASH advisory of 13 November 2026 (FLASH-20261113-001), as summarized by SC Media and others, ARTEX is an open-source, LLM-driven penetration-testing framework written in Go. The FBI says threat actors have used it since at least August 2026 to automate parts of intrusions, and that some went from initial targeting to privileged access in under three hours. It is a tool, not a group: many different actors can run it. If the Cloudforce One sighting does reflect ARTEX activity, it would mean an automated framework testing a brand-new CVE within a day, but a shared IP says little about who is operating it.

What to take from the User-Agent detail

A User-Agent is whatever the client says it is. A scanner that announces itself in one request and says "Chrome" in the next shows that scanners rotate headers. Do not write a rule that treats a Chrome User-Agent as safe, and do not rely on a rule that blocks java4shell-recon: both are trivial to change. Cybersecurity News makes the same point and, citing the FBI, advises checking IP indicators against current network activity before blocking.

Step 1: Are you exposed?

You need an unpatched build, an x86-64 CPU with AVX-512 VBMI, and an application that passes attacker-controlled Base64 to the decoder. Start with the CPU:

grep -o -w avx512vbmi /proc/cpuinfo | sort -u
Enter fullscreen mode Exit fullscreen mode

On the sandbox I used, this printed avx512vbmi, so it is on the exposed path. No output means the CPU does not advertise the feature. Patching is still the safer answer, because workloads move between hosts.

Then the Java versions. Check every runtime, not just the one on your PATH: application servers, bundled JREs, and container images each carry their own.

# Every Java installed through the package manager (Debian/Ubuntu)
ls /usr/lib/jvm/
/usr/lib/jvm/java-21-openjdk-amd64/bin/java -version

# What a running service actually uses
readlink /proc/<pid>/exe
jcmd <pid> VM.version
Enter fullscreen mode Exit fullscreen mode

In my test, readlink /proc/<pid>/exe showed the exact java binary of a running process, and jcmd <pid> VM.version printed 17.0.21.1+2-1-24.04.1-Ubuntu. A host can have a patched Java on the PATH while a service runs an older bundled one, which is the usual reason a "patched" server turns out not to be.

On my machine the default Java was 21.0.12.1, which is not a fixed build, while OpenJDK 17 was already 17.0.21.1. That is a useful reminder that a host can be half patched.

Is the vulnerable intrinsic in use?

You can ask the JIT whether it is using the Base64 intrinsic with a harmless valid-input program (this only decodes a valid string, nothing malformed):

import java.util.Base64;

public class B64 {
    public static void main(String[] a) {
        byte[] src = new byte[4096];
        for (int i = 0; i < src.length; i++) src[i] = (byte) i;
        String s = Base64.getEncoder().encodeToString(src);
        long sum = 0;
        for (int i = 0; i < 60000; i++) sum += Base64.getDecoder().decode(s).length;
        System.out.println(sum);
    }
}
Enter fullscreen mode Exit fullscreen mode
javac B64.java
java -XX:+UnlockDiagnosticVMOptions -XX:+PrintIntrinsics B64 | grep -i base64
Enter fullscreen mode Exit fullscreen mode

On both OpenJDK 17.0.21.1 and 21.0.12.1 here, this printed java.util.Base64$Decoder::decodeBlock (186 bytes) (intrinsic). Adding -XX:-UseBASE64Intrinsics removed those lines. Read this correctly: it shows that the intrinsic is compiled on this CPU, which is the exposure path. It does not tell you whether the build is vulnerable, because the patched 17.0.21.1 uses the intrinsic too (with the fix). Version is what decides that.

Step 2: Patch and restart

Oracle's list of fixed builds, as reproduced on Cloudflare's tracking page: 8u513, 11.0.33.1, 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1. Other vendors (Temurin, Corretto, Zulu, Microsoft, Red Hat, distributions) ship their own build numbers, so install their fixed release rather than matching Oracle's. Oracle's advisory lists more affected lines than the "17.0.6 and later" in the research reports, and Sonatype warns not to treat Oracle's affected list as the confirmed range for this CVE. Patch every line you run.

On Ubuntu 24.04 I verified both of the following:

  • The package changelog for openjdk-17 17.0.21.1 lists CVE-2026-114938, and the changelog for 21.0.13.1 does too. The earlier 21.0.12.1 changelog does not.
  • apt-get install --only-upgrade openjdk-21-jre-headless openjdk-21-jdk-headless moved java -version from 21.0.12.1 to 21.0.13.1 (dated 2026-11-17).
sudo apt-get update
sudo apt-get install --only-upgrade openjdk-17-jre-headless openjdk-21-jre-headless
zgrep -c CVE-2026-114938 /usr/share/doc/openjdk-21-jre-headless/changelog.Debian.gz
Enter fullscreen mode Exit fullscreen mode

Then restart every Java service. A running JVM keeps using the code it loaded at start, so a package upgrade alone does not protect a process that started before it. Confirm with jcmd <pid> VM.version after the restart. For applications that ship their own Java (Elasticsearch bundles a JDK, and many container images include one), the fix comes from updating or rebuilding that product or image.

Step 3: If you cannot patch today

Two JVM options are reported as temporary mitigations (BleepingComputer; SOCRadar names the first):

  • -XX:-UseBASE64Intrinsics: turns off the vulnerable intrinsic, so the decoder uses ordinary Java code.
  • -XX:UseAVX=2: stops the JVM using AVX-512 instructions.

I confirmed on OpenJDK 17.0.21.1 that both flags exist in this JVM. The default on this CPU was UseAVX = 3 and UseBASE64Intrinsics = true. With -XX:-UseBASE64Intrinsics the second flag read false. With -XX:UseAVX=2, UseBASE64Intrinsics also defaulted to false, so both options end up disabling the intrinsic here. I did not test whether either blocks the vulnerability itself, since I did not run any exploit, and I did not measure the performance cost. Cloudflare's tracking page lists no workaround flags at all and recommends only updating and restarting, so treat these as a stopgap.

To apply a flag to a service, add it to that service's Java options (for example its JAVA_OPTS or unit file), then restart it. The generic JAVA_TOOL_OPTIONS environment variable also works for any JVM; the JVM prints a "Picked up JAVA_TOOL_OPTIONS" line on start, which is how I confirmed it was read in my environment.

Detection

I did not test detection. The advice in the reports is:

  • Prioritize internet-facing services.
  • Compare web and application logs for repeat requests to the same service, including the same address returning later under another User-Agent.
  • Check host logs for unexpected Java crashes (a failed exploit attempt can crash the JVM rather than run code, per the "easy to crash, hard to exploit" analysis). JVMs write hs_err_pid*.log files on a hard crash, so look for new ones.
  • Treat the java4shell-recon User-Agent as one clue, not a filter.

Common mistakes

  • Checking thePATHJava only. Check each service's runtime.
  • Upgrading but not restarting.
  • Assuming input validation protects you. Per Datadog, the bug is reached before the application can reject input.
  • Relying on a dependency scan. It is a runtime flaw.
  • Blocking by User-Agent. It is attacker-controlled.
  • Waiting because "ARM is safe". That helps only if every host is ARM64; your x86-64 hosts with AVX-512 VBMI are the exposed ones.

Related Dev Talk articles

Frequently asked questions

Is Java4Shell being exploited?

Exploit attempts and scanning are reported by Cloudflare and watchTowr. A confirmed breach has not been reported in the coverage I read, and a CISA alert urges patching.

Did ARTEX disguise itself as Chrome?

Not established. Cloudforce One saw ARTEX-linked and Java4Shell traffic from one IP, and a Chrome-claiming exploit attempt after an earlier labelled probe, but the reports do not say ARTEX sent the Chrome request.

Does it affect ARM servers?

The vulnerable path is reported to be x86-64 only, on CPUs with AVX-512 VBMI. ARM64 does not use it.

Which Java versions are fixed?

Oracle lists 8u513, 11.0.33.1, 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1. Other vendors use their own numbering, so check their advisory.

Is my application safe if it validates Base64 first?

Not on the evidence available. The flaw is in the runtime's decoder, reached before your validation, according to Datadog.

update log

  • 21 November 2026: first version.
  • To recheck on each update: confirmed exploitation or a CISA KEV listing, a public weaponized exploit, vendor fixed-build numbers (Temurin, Corretto, Red Hat), and whether the workaround flags are confirmed to block the bug.

Sources


Originally published on DEV Talk.

Top comments (0)