跳到正文
DEV Community· Ilia Dubovskii·· 36 分鐘前精選AI 評分76

Java2Shell(CVE-2026-114938):已確認事項、修補版本與應對方法

Java2Shell (CVE-2026-114938): what is confirmed, what is not, and what to do now

AI 導讀

Oracle 和 OpenJDK 已確認 CVE-2026-114938(Java2Shell/Java4Shell)是 HotSpot JVM 記憶體破壞漏洞;OpenJDK 修補版本為 17.0.21.1、21.0.13.1、25.0.5.1 和 27.0.1.1。

推薦理由

文章把漏洞暴露條件拆成 JDK 版本、CPU 指令集和外部輸入三項,並提供檢查及臨時緩解步驟,便於排查正在運行的 JVM。

正文 · 原文

Java2Shell (CVE-2026-114938, called Java4Shell in most advisories) is confirmed and fixed. Oracle and the OpenJDK project published it on 17 November 2026 as a memory-corruption bug in the HotSpot JVM, in Java 17 (from 17.0.6), 21, 25 and 27, and fixed builds exist from every large JDK vendor. On 25 November 2026 the open questions are different ones: how hard remote code execution really is, whether anyone has been compromised, and whether your running JVMs have the fix.

Last checked: 25 November 2026. Written by Ilia Dubovskii, founder of Beamreach. Our first Java2Shell page described 17 November, when the CVE was reported but not confirmed. This article is the update.

The short version

  • CVE-2026-114938 is confirmed by Oracle and OpenJDK. The fixed OpenJDK versions are 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1. Standard Java 8 and 11 builds are not affected.
  • A JVM is exposed only when three things are true: an affected build, an x86-64 CPU with AVX-512 VBMI, and Base64 input from outside reaching the JDK's decoder. Arm64, including AWS Graviton, is not affected.
  • Scanning is real, compromise is not confirmed. On 25 November GreyNoise counted 261 trigger-shaped requests from 7 addresses and 0 successful intrusions on its sensors. CVE-2026-114938 is not in CISA's Known Exploited Vulnerabilities catalogue.
  • Sources disagree on severity: Oracle scores 8.1, Amazon Linux 8.8, Red Hat 9.8, and the finder 9.2 on a different scale. Crashing a JVM is easy. Code execution needs an exploit built for each application.
  • If you can't deploy a fixed JDK today, start the JVM with -XX:-UseBASE64Intrinsics. It needs a restart, the same as the fix.
  • A honeytoken in the workload's environment covers the time until the fix is running. It doesn't stop the exploit and it doesn't see a crash.

What changed since 17 November

On 17 November 2026 our page said: reported, not confirmed, no fixed build confirmed. All three are out of date.

  • Confirmed. Oracle's Critical Security Patch Update for November 2026 lists CVE-2026-114938 in the Java SE risk matrix, component "Compiler", CVSS 3.1 score 8.1. The OpenJDK vulnerability advisory of 17 November 2026 lists the same CVE under hotspot/compiler and marks Java 17, 21, 25 and 27 as affected, and Java 8 and 11 as not affected.
  • Fixed. Oracle released the fix at 1:00 pm Pacific time on 17 November, according to Calif's write-up. Amazon Corretto shipped the same day. Eclipse Temurin and Red Hat followed on 18 and 19 November.
  • Root cause published. Calif, the firm that reported the bug, published the cause the same day: the AVX-512 version of the java.util.Base64 decoder computes a negative length when the input ends in padding and writes 62 bytes past the end of a buffer. The public trigger is 64 letters A followed by = (128 letters on Java 17). Calif published a reproducer that shows the overwrite. Calif says it is holding back its exploit chains for specific applications until users have had time to upgrade.
  • Credit and history. Oracle credits Albert Yang and Quang Luong of Calif.io. Calif's timeline says the crash was first reported publicly in an Adoptium support issue on 9 June 2026, a fix was proposed in OpenJDK on 9 September and closed without merging, and Calif reported it to Oracle with a working exploit on 24 October.
  • CISA alert. CISA published an alert on 17 November 2026 that urges immediate patching. The alert does not say the bug is being exploited.

The two names still mean one CVE. Vendors and CISA write "Java4Shell". We keep "Java2Shell" because it sits in the same family as React2Shell and PHP2Shell on our *2Shell vulnerabilities page.

What is confirmed, and what is not

Claim Status on 25 November 2026 Source
CVE-2026-114938 is a real bug in the JDK Confirmed Oracle, OpenJDK, NVD
Affects Java 17 from 17.0.6, and 21, 25, 27 Confirmed. OpenJDK marks 17, 21, 25, 27. Red Hat states the code arrived in 17.0.6 OpenJDK, Red Hat
Only x86-64 CPUs with AVX-512 VBMI Confirmed by Red Hat, AWS, Eclipse Temurin and Jenkins. Oracle's advisory doesn't mention the CPU Red Hat bulletin, AWS
Remote code execution without login Demonstrated by Calif against Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate in default configurations. Red Hat and Keycloak repeat the claim. The exploit chains are not public Calif, Keycloak
Fixed builds exist Confirmed for Oracle, Corretto, Temurin, Red Hat, Microsoft, Azul, Debian and Ubuntu See the table of fixed builds below
Exploited in the wild Scanning and blind attempts are reported. No confirmed compromise GreyNoise, SecurityWeek
In CISA's KEV catalogue No. Catalogue version 2026.11.24 has no entry for CVE-2026-114938 CISA KEV

What nobody outside Calif and a few vendors can check yet is how reliable code execution is against a given product. VulnCheck's analysis says that crashing an affected JVM is trivial, and that code execution needs heap grooming plus a separate memory leak for each target. VulnCheck doesn't expect the bug to be "easily or widely exploitable", and also says it has a full exploit that it gives to its customers.

Where the sources disagree

The score. Four numbers are in circulation for CVE-2026-114938, and they come from different assumptions.

Who Score What it assumes
Oracle and OpenJDK 8.1, CVSS 3.1 No login needed, attack complexity high
Amazon Linux 8.8, CVSS 3.1, "Important" Code execution needs a logged-in low-privilege user; without login the result is a crash
Red Hat 9.8, "Critical" No login needed, attack complexity low
Calif 9.2, CVSS 4.0 The finder's own score, on a different scale

Sources: Oracle, Amazon Linux, Red Hat, JFrog for Calif's score. Amazon Linux and Red Hat describe the same bug and disagree on whether an attacker needs an account. Plan for the worse reading.

Java 8 and 11. Standard OpenJDK 8 and 11 builds are not affected. Two commercial products are exceptions: Oracle lists the Java SE 8 Enterprise Performance Pack (8u511b33-perf) as affected, and Azul says Azul Prime for Java 8 and 11 is affected. If you run either, "we're on Java 8" isn't an answer.

Exploitation. GreyNoise, last updated 25 November 2026 at 09:48 UTC, shows 7 addresses that sent 261 requests with the trigger shape in an Authorization header, and 0 successful intrusions against its sensors. SecurityWeek reported on 19 November that watchTowr saw requests with a java4shell-recon user agent and blind exploitation attempts, and that Previdian logged nine attempts and couldn't tell whether any target was compromised. AWS says it has no evidence that the issue has been used. So the honest status is: attempts yes, confirmed compromise no. A sensor that isn't a real Jira or Keycloak can't be compromised by an exploit written for Jira or Keycloak, so "0 intrusions" says little about real targets.

Fixed builds by distribution

The fix is a new JDK build. Nothing in your pom.xml or build.gradle changes.

Distribution Fixed build Source
OpenJDK, upstream 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 Eclipse Temurin
Oracle Java SE and GraalVM for JDK 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1; 8u513-perf for the Enterprise Performance Pack. GraalVM Enterprise Edition 21.3: no fix listed watchTowr, reading Oracle's advisory
Eclipse Temurin jdk-17.0.21.1+2, jdk-21.0.13.1+2, jdk-25.0.5.1+2, jdk-27.0.1.1+4, published 18 November. Docker tags such as 17.0.21.1_2-jre-noble exist. Some platforms were still in progress Temurin, status issue
Amazon Corretto 17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2, 27.0.1.1.4, published 17 November AWS bulletin 2026-189
Amazon Linux ALAS2-2026-4123 (AL2, Corretto 17); ALAS2023-2026-3478 to 3481 (AL2023, Corretto 17, 21, 25, 27). Corretto 22, 23, 24 and 26: no fix planned Amazon Linux
Red Hat Red Hat build of OpenJDK 17.0.21.1, 21.0.13.1, 25.0.5.1 on 18 November; RHEL 8, 9 and 10 packages on 19 November (RHSA-2026:100563 to 100572) Red Hat CVE page
Microsoft Build of OpenJDK 17.0.21.1, 21.0.13.1, 25.0.5.1 Microsoft release notes
Azul The November 2026 builds of Azul Core; Azul Prime 26.08.110.0 and 26.02.510.0 Azul
Debian openjdk-17 17.0.21.1+2-1~deb12u1 (bookworm); openjdk-21 21.0.13.1+2-1~deb13u1 and openjdk-25 25.0.5.1+2-1~deb13u1 (trixie). Testing was still vulnerable Debian tracker
Ubuntu openjdk-17 17.0.21.1+2, openjdk-21 21.0.13.1+2 and openjdk-25 25.0.5.1+2 on 22.04 and 24.04 Ubuntu

Java 18, 19, 20, 22, 23, 24 and 26 get no fix. JFrog says to move to a supported line.

Products that bundle a JDK publish their own updates. Keycloak updated its 26.8 container images to OpenJDK 21.0.13.1; the tags 26.8.2-1 and 26.8.2-2 carry an affected build. Jenkins tells administrators to update Java under the controller. SecurityWeek lists Elastic, Atlassian, Cisco and Siemens advisories; read your vendor's page for the product you run.

How to check if you are affected

A JVM is exposed to CVE-2026-114938 when all three answers are yes. Check them in this order, because the first two take minutes.

1. Is the Java version affected? Affected: 17.0.6 up to 17.0.21.0.x, 21 below 21.0.13.1, 25 below 25.0.5.1, 27 below 27.0.1.1, and every release of 18 to 20, 22 to 24 and 26. The fixed builds have a .1 in the fourth position.

# on a host
java -version

# in a running container or pod
docker exec <container> java -version
kubectl exec <pod> -- java -version

# in an image, without starting the application
docker run --rm --entrypoint java <image> -version

# the version a running process really uses (it may differ from the java on the path)
jcmd <pid> VM.version

JDKs that aren't on the path, such as the one bundled inside Elasticsearch, Jenkins or a vendor appliance, need a search. Every JDK and JRE ships a release file with a JAVA_VERSION line:

find / -type f -name release -exec grep -H '^JAVA_VERSION=' {} + 2>/dev/null

2. Does the CPU have AVX-512 VBMI? Run this on the host or inside the container. If it prints avx512vbmi, the CPU has the instruction.

grep -o -w -m1 'avx512vbmi' /proc/cpuinfo

Red Hat's bulletin lists four flags that must all be present: avx512f, avx512bw, avx512vbmi and bmi2. Intel Ice Lake and later and AMD Zen 4 and later have them. AWS names the EC2 families C6i, M6i, R6i, C7i, M7i, R7i, C7a, M7a and R7a. The same image can be exposed on one node and safe on another, so check where the workload runs, not where it was built.

3. Where does the JDK come from in your code? This is where the fix will be made. Search the Dockerfiles, then look at the ECS task definitions and their CPU architecture. An empty architecture means x86-64.

grep -rnEi --include='Dockerfile*' \
  'temurin|corretto|openjdk|zulu|liberica|sapmachine|graalvm|tomcat|jetty|maven|gradle|keycloak|jenkins' .

aws ecs describe-task-definition --task-definition <name> \
  --query "taskDefinition.[runtimePlatform.cpuArchitecture,containerDefinitions[].image]"

Base images are often one level down. If your FROM line names an internal image, run the docker run command above against that image.

Lambda. AWS says Lambda functions on the default execution environment are not affected, because that environment doesn't support AVX-512 VBMI. Functions on Lambda Managed Instances may be affected, depending on the instance type. Functions deployed as container images have no runtime in the first list below; rebuild those from the patched base image. For ZIP functions, AWS has updated the managed Java runtimes for functions in Auto mode.

# Java functions, their runtime and architecture
aws lambda list-functions --output table \
  --query "Functions[?contains(Runtime || '', 'java')].[FunctionName,Runtime,Architectures[0]]"

# functions deployed as container images
aws lambda list-functions --query "Functions[?PackageType=='Image'].FunctionName"

# runtime update mode of one function
aws lambda get-runtime-management-config --function-name <name>

Fargate. You don't choose the CPU on AWS Fargate. AWS says customers running Java on Fargate x86-64 are responsible for updating the JDK, and that Fargate tasks on Graviton are not affected. Treat an x86-64 Fargate task with an affected JDK as exposed.

What to do now

In order of urgency.

  1. Today: find internet-facing JVMs on affected builds and affected CPUs. Login services first. Calif's list of pre-auth targets is Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate, and the requests GreyNoise records carry the trigger in an Authorization header, which a service decodes before it knows who you are.
  2. Today, where you can't deploy a fixed JDK yet: turn the decoder off. Start the JVM with -XX:-UseBASE64Intrinsics. Red Hat, AWS, Temurin and Jenkins all give this flag as the interim mitigation. It disables only the accelerated Base64 path. In a container the simplest place is the environment variable JAVA_TOOL_OPTIONS=-XX:-UseBASE64Intrinsics, followed by a restart. The alternative -XX:UseAVX=2 turns off all AVX-512 use; Red Hat warns that an Arm64 JVM won't start with it. Both flags can cost performance.
  3. Verify the flag in the running process. jcmd <pid> VM.flags -all | grep UseBASE64Intrinsics should show false. An environment variable that was set after the process started changes nothing.
  4. This week: deploy the fixed build. Change the base image tag or the package version, rebuild, redeploy, and restart every JVM. A patched JDK on disk doesn't change a JVM that is already running. Then run java -version in the running container again.
  5. This week: update the products that bundle a JDK. Keycloak, Jenkins, Elasticsearch, Atlassian Data Center products and appliances ship their own Java. Your base image fix doesn't reach them.
  6. Until all of that is done: reduce what can reach the service. CISA's alert suggests limiting unauthenticated access and enforcing input-size limits where patching has to wait. An admin interface that only your VPN can reach is a much smaller target.
  7. Watch for crashes. A failed attempt can look like a JVM crash: an hs_err_pid file, a restart loop, a service that falls over under a burst of requests. VulnCheck found that one request usually didn't crash a default server and a burst did. CISA lists unexpected JVM crashes among the things to monitor. Until the fix is in, treat a crash of an internet-facing JVM as a possible attempt.
  8. Remove the flag after the fix is verified, so you get the Base64 performance back.

The window before your fix is running: a honeytoken

Steps 4 and 5 take days in most fleets, and longer for appliances. A honeytoken is the cheapest cover we know for that window. It is a decoy credential that nothing legitimate uses, placed where an attacker looks first.

Whatever the exploit chain for a given Java application turns out to be, code execution in a JVM leads to the same next step as in every other *2Shell bug: read the environment variables and config files for credentials, then try them. So the setup doesn't depend on the bug:

  1. Put a decoy AWS access key in the environment of each Java workload, next to the real variables. The application never reads it.
  2. Use one decoy per workload, so the key ID tells you which workload was entered.
  3. Match any CloudTrail event from that key with an EventBridge rule and send it to the channel people watch.
  4. Attach one response that can be undone: restart the task from its image, or deactivate the key.

The Terraform for this is in AWS canary credentials with Terraform.

This is how our own two incidents differed. React2Shell in December 2025 took us four days to contain, with CPU, traffic and cost alerts firing and being explained away. PHP2Shell in October 2026 got code execution in one of our PHP containers on AWS Fargate; the attacker read the environment and tried the decoy key, the alert was in Slack in under a minute, the task was restarted within another minute, and nothing was harmed. We haven't been hit through Java2Shell, so we have no numbers for it.

What a honeytoken does not do for Java2Shell. It doesn't stop the exploit request. It doesn't see an attacker who only crashes the JVM, and crashing is the easy outcome of this bug. It doesn't see an attacker who never uses the decoy. A restart ends one session; if the JDK is still unpatched and the flag isn't set, the attacker can come back. Keep your other alerts and GuardDuty. The honeytoken tells you that something is an attack; the other signals tell you what happened.

Where Compass fits, and where it doesn't

Compass is our open-source (Apache 2.0) operations agent for AWS. For Java2Shell its help is limited, and the limit matters:

  • Honeytokens: yes. Compass plants decoy AWS keys and database logins as Terraform pull requests and can restart the ECS task or deactivate the key when one is used. That part doesn't care which runtime the workload uses. Docs.
  • Inventory: partly. Compass's map records the image each ECS task definition runs and the base images in your Dockerfiles, with internet exposure. It doesn't know which CPU a task lands on.
  • Patch pull requests: no. Java is NOT on the default product list of Compass's patch captain. That list covers PHP, Node, Python, nginx and others, see the patching docs. Compass won't open the JDK upgrade pull request for CVE-2026-114938 by default. Plan on your own upgrade process.

FAQ

Is Java2Shell the same as Java4Shell?
Yes. Both names mean CVE-2026-114938. Oracle uses neither name. CISA, Red Hat, AWS and most security vendors write "Java4Shell".

Which Java versions are affected by CVE-2026-114938?
OpenJDK 17 from 17.0.6, and 21, 25 and 27 before the fixed builds 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1, on x86-64 CPUs with AVX-512 VBMI. The unsupported lines 18 to 20, 22 to 24 and 26 are affected and get no fix. Standard Java 8 and 11 builds are not affected; Oracle's Java 8 Enterprise Performance Pack and Azul Prime 8 and 11 are.

Is Java2Shell being exploited?
Scanning and blind exploitation attempts have been reported since 18 November 2026. On 25 November 2026 no source we could open confirmed a successful compromise, and CVE-2026-114938 was not in CISA's Known Exploited Vulnerabilities catalogue. A public reproducer for the memory corruption exists; the exploit chains for specific products have not been published.

Is there a workaround for Java2Shell?
Yes. Start the JVM with -XX:-UseBASE64Intrinsics and restart it. Red Hat, AWS, Eclipse Temurin and Jenkins all list this flag as the interim mitigation until the fixed JDK is deployed. Check the running process with jcmd, not the environment variable.

Are AWS Lambda and Graviton affected?
AWS says Java workloads on Graviton are not affected, and that Lambda functions on the default execution environment are not affected because it lacks AVX-512 VBMI. Lambda Managed Instances, EC2, ECS and Fargate on x86-64 can be affected, and the JDK update there is the customer's job.

Sources


This article was first published on beamreach.ai. It was drafted with AI assistance and reviewed by the author.

來源:DEV Community · dev.to