Skip to main content
November 18, 2026

Java4Shell: Find the Internal Java Apps You Forgot

Java4Shell: Find the Internal Java Apps You Forgot

On November 17, 2026, Calif disclosed Java4Shell, a heap out-of-bounds write in the HotSpot Base64 decoder. Your internet-facing Jira and Keycloak will get patched this week because scanners and headlines will make someone do it. The harder problem is the rest of the fleet: the internal billing tool, the Kafka cluster behind the firewall, the vendor appliance with its own JRE. Nobody files a ticket for those, because nobody thinks of them as exposed.

This post turns the disclosure into an inventory exercise you can finish before the next one.

What Java4Shell Actually Is

The facts below come from the Calif write-up, Red Hat's CVE page, and the Tenable FAQ.

  • Component: the x86-64 intrinsic that HotSpot uses for java.util.Base64 decoding on CPUs with AVX-512 VBMI. Red Hat classifies it as CWE-787 (out-of-bounds write).
  • Affected runtimes: OpenJDK 17.0.6 and later, plus the 21, 25 and 27 lines, across downstream builds (Temurin, Corretto, Zulu, Red Hat, Oracle and others). Standard Java 8 and 11 do not contain the code. Oracle's 8u511b33-perf build is the exception.
  • Fixed Oracle builds: 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1, per Tenable and Qualys. Other vendors ship on their own schedule. As of November 18, Red Hat and Ubuntu had not released fixed packages.
  • Hardware condition: the CPU must report avx512f, avx512bw, avx512vbmi and bmi2. ARM64 is not affected.
  • Severity: Red Hat scores it 9.8 (CVSS 3.0). The CVE record says 8.1 with high attack complexity. Calif uses CVSS 4.0 and gets 9.2.

Calif reports pre-auth RCE in default configurations of Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate, and post-auth RCE in Kafka, Solr, Elasticsearch, Gerrit and Spinnaker. It also says "there is no universal exploit": each target needs its own chain. VulnCheck, as reported by Help Net Security, found that crashing an affected JVM is trivial, while RCE needs heap grooming plus a separate memory leak to beat ASLR. As of November 18, no source we read had confirmed a successful exploitation in the wild.

Why This Is Not a Library Hunt

After Log4Shell, most teams learned to grep lockfiles and SBOMs for a vulnerable jar. That does not work here. The bug sits in the runtime, so your pom.xml is clean and a dependency scanner like OSV-Scanner finds nothing in it.

It is also more limited than Calif's earlier PHP2Shell, which Calif describes as "always exploitable under default configurations." Java4Shell needs a specific CPU, a warm JIT, and attacker-controlled Base64 that reaches the decoder. That makes it harder to exploit. But it is harder to inventory too, because the runtime hides in three places:

  1. Base images. FROM eclipse-temurin:21-jre was current when someone wrote the Dockerfile in 2024. The image was never rebuilt.
  2. Vendor bundles. Jira, Confluence, Jenkins, Keycloak and Elasticsearch ship their own runtime. OX Security notes that java -version on the host "may not be the one the service uses." Keycloak says plainly: do not use the Keycloak version number alone to decide whether a deployment is fixed.
  3. Hardware you do not control. The same image is vulnerable on a Sapphire Rapids node and safe on a Graviton node. A reschedule can change your exposure without a deploy.

Nobody bumps what is not broken. Veracode's Log4j study from December 2023, two years after Log4Shell, found 38 percent of scanned applications still on vulnerable Log4j versions, and 32 percent on Log4j 1.2.x, end-of-life since August 2015. Veracode also reports that 79 percent of the time developers never update a third-party library after adding it. We found no data that splits patch rates by internet-facing versus internal services, but a JRE baked into an internal image ages the same way.

The Inventory, Step by Step

1. Find Every Running JVM and Its Real Runtime

Run this as root on each host. It reads the release file of the runtime each process actually executes, including processes inside containers, through /proc/<pid>/root:

for pid in $(pgrep -x java); do
  exe=$(readlink /proc/$pid/exe)
  home=$(dirname "$(dirname "$exe")")
  printf '%s %s ' "$pid" "$exe"
  grep -h '^JAVA_VERSION=' "/proc/$pid/root$home/release" 2>/dev/null || echo 'no release file'
done

Anything on 17.0.6 or later and below your vendor's fixed build goes on the list. "No release file" means you check that one by hand.

2. Check the CPU Under Each JVM

This is the check Calif and Qualys publish. All four flags must appear:

grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)
#39;

In Kubernetes, record the node pool, not just the node. kubectl get nodes -L kubernetes.io/arch shows the architecture, and the instance type tells you the CPU generation. Qualys gives the right rule: "Use the processor condition to order the work, not to close findings."

3. Pin the Images, Not Just the Hosts

For every image that runs Java, record the runtime version next to the image digest:

docker run --rm --entrypoint java registry.internal/billing:2024.3 -version

An image tag that has not been rebuilt since the fixed JDK shipped is vulnerable by definition. Add the runtime to whatever you already use for image scanning, such as Trivy, and treat a missing runtime version as a finding.

4. Map Who Can Send It Base64

Base64 shows up in exactly the places attackers reach first: HTTP Basic auth headers, JWTs, SAML artifacts, CSRF tokens and file uploads, per Tenable and Help Net. For each service, answer two questions. Does any input decoded before login come from outside the service? Who can reach the port: the internet, the VPN, every laptop on the office network, or only one upstream service?

"Internal" is not an answer. A service that any VPN user can reach is one phished laptop away from the internet.

The Patch-or-Compensate Rule

Write the rule down now, so the next disclosure is a lookup instead of a meeting.

Runtime CPU condition Pre-auth Base64 input Reachable from Action
Affected Met Yes Internet Flag today, patch today, restart
Affected Met Yes VPN or office network Flag today, patch in the next ring, owner and date
Affected Met No (post-auth only) Internal Patch in the next ring
Affected Not met or ARM Any Any Patch on the normal cadence, pin the node pool
Vendor bundle, no fix yet Met Any Any Flag, verify the flag, track the vendor advisory
Affected, no owner Any Any Any Flag, restrict network access, assign an owner or schedule removal
Java 8 or 11 (standard) Any Any Any Not affected by this CVE; record it anyway

"Flag" means -XX:-UseBASE64Intrinsics, which Calif and Keycloak recommend. It turns off the hardware-accelerated Base64 code and leaves the rest of AVX-512 alone. Qualys warns that Base64-heavy applications may run slower, so test it first. Keycloak shows how to pass it through JAVA_OPTS_APPEND, or through JDK_JAVA_OPTIONS for its Operator. Three traps:

  • The flag needs a restart. Qualys says a patch or a flag "takes effect only when the JVM restarts." Verify on the live process with jcmd <pid> VM.flags -all | grep -F UseBASE64Intrinsics, and expect false.
  • Do not reach for -XX:UseAVX=2 in multi-arch images. It disables all of AVX-512, and Qualys and OX both note that Java on ARM will not start with it. One shared JAVA_OPTS value across mixed node pools turns a mitigation into an outage.
  • Do not count on the proxy. OX says request buffering in nginx "breaks some exploit chains but not all," and Qualys says size limits alone will not stop the bug because the malformed input is very short.

Where an Agent Helps

This sweep is mostly reading: hosts, pods, images and an owner spreadsheet, cross-referenced. That is the kind of repetitive work an agent does well. With Akmatori you can write a skill that runs the four steps above. Akmatori's SSH connector is read-only by default, so the agent can read /proc/cpuinfo and release files without write access. For checks the read-only rules do not cover, such as jcmd, you add allowed command patterns on the connector. An allowed command can never contain $, so write the skill to run one command per PID instead of the loop above. The Kubernetes connector gives read-only access to nodes and pods, and an inventory you upload as a Context File gives the agent your owner list. The agent reports a table. A human decides what to restart.

Conclusion

Java4Shell is hard to exploit and easy to crash, and the fix is a runtime update plus a restart. The real cost is finding every JVM, because the runtime hides in base images, vendor bundles and node pools nobody remembers. Build the inventory this week, write the patch-or-compensate rule into your runbook, and the next JDK disclosure becomes a query.

If your team wants AI-assisted incident workflows on your own infrastructure, Akmatori helps SRE teams investigate alerts, coordinate response, and automate safe infrastructure actions. Powered by Gcore for global infrastructure reliability.

Automate incident response and prevent on-call burnout with AI-driven agents!