Databases

Patch Java4Shell (CVE-2026-114938) in Elasticsearch and OpenSearch

Elasticsearch 9.5.7, 9.4.10 and 8.19.26, available since 23 November 2026, bundle OpenJDK 27.0.1.1+4 and close Java4Shell (CVE-2026-114938). Elasticsearch 9.5.6 and 8.19.25 both bundle OpenJDK 27.0.1.0.3, the last 27 build the bug affects, and Calif’s published trigger reproduced the out-of-bounds write in 5 of 5 runs inside each image on a Sapphire Rapids host. OpenSearch 3.10.0 bundles Temurin 25.0.5+8 and Logstash 9.5.6 bundles Temurin 21.0.13+9, and both reproduced on every run too.

Original content from computingforgeeks.com - post 192051

On Elasticsearch the fix is now an upgrade. OpenSearch has no fixed release yet, and a cluster that cannot upgrade today needs the stopgap: one line in jvm.options.d, rolled through one node at a time without going red. We measured the stopgap on a Google Cloud c3 instance (Elasticsearch 9.5.6 on Ubuntu 24.04, 19 November 2026) across Docker Compose, ECK, OpenSearch and Logstash, then checked the fixed images (Elasticsearch 9.5.7, November 2026) on c3 amd64 and c4a arm64 hosts. The Java4Shell overview covers the bug and the distro fixes.

Two results matter before you touch a node. JAVA_TOOL_OPTIONS, the variable most Java4Shell guides use, is ignored by both Elasticsearch and OpenSearch, and an options file without the .options suffix is ignored without a warning.

Product and versionBundled JDKCalif triggerFix status on 23 Nov 2026
Elasticsearch 9.5.6OpenJDK 27.0.1.0.3REPRODUCED, 5 of 5Fixed in 9.5.7 (fix due in 9.6.0, not released yet)
Elasticsearch 8.19.25OpenJDK 27.0.1.0.3REPRODUCED, 5 of 5Fixed in 8.19.26
Elasticsearch 9.5.7, 9.4.10, 8.19.26OpenJDK 27.0.1.1+4NOT REPRODUCED, 5 of 5 eachFixed
Logstash 9.5.6Temurin 21.0.13+9REPRODUCED, 5 of 5Mitigated by default in 9.5.7 (intrinsic off, JDK unchanged)
Logstash 9.5.7Temurin 21.0.13+9 (unchanged)Bare JDK REPRODUCED, 3 of 3Mitigated: launcher adds -XX:-UseBASE64Intrinsics
OpenSearch 3.10.0Temurin 25.0.5+8REPRODUCED, 5 of 5No release yet (OpenSearch issue #23666)
OpenSearch 2.19.7Temurin 21.0.12.1+1REPRODUCED, 3 of 3No release yet
Any of the above with -XX:-UseBASE64IntrinsicssameNOT REPRODUCEDMitigated

The OpenSearch 2.19.7 row is the one to read twice. Its JDK is 21.0.12.1, which carries a .1 in the fourth field and is still vulnerable. Fixed builds are 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1 or later, and Elastic’s November releases ship 27.0.1.1+4.

What Elastic says is exposed

Elastic’s security announcement of 18 November rates the risk by who can reach a Base64 decode. Any user with at least read access can turn it into remote code execution on Elasticsearch 7.17.3 and later, and an unauthenticated client can crash a node. Calif’s own write-up adds that its Elasticsearch chain runs from one complete request, so a proxy that buffers request bodies does not stop it.

  • Elasticsearch 7.17.3 and later: authenticated RCE, unauthenticated denial of service.
  • Logstash 8.6.2 and later: only through the elastic_integration filter, when an ingest pipeline decodes Base64 from an untrusted source. The result is a crash, not code execution.
  • Not affected: Kibana, Beats, Elastic Agent, APM Server, Elastic Maps Server and the ECK operator, because none of them runs on Java.

Elastic Cloud Hosted on AWS and GCP is not affected at this time, per Elastic, and Elastic is deploying a configuration change to the small share of Azure deployments on vulnerable CPUs. Self-managed clusters, Docker and ECK are where the work is. OpenSearch has published no advisory, but it runs the same kind of bundled HotSpot JDK, and the trigger reproduced in both lines we tested.

Step 1: Check the CPU and the bundled JDK

Only x86-64 CPUs with AVX-512 VBMI generate the vulnerable decoder stub, so the first check runs on each host. Elastic’s announcement uses a single count:

grep -c avx512vbmi /proc/cpuinfo

On the c3 test box (Intel Xeon Platinum 8481C, 8 vCPUs) the flag appears once per vCPU, so the count is 8. Zero means the node never builds the stub, which is the case on ARM and on older x86 CPUs:

8

The same host also reported AVX-512F, AVX-512BW and BMI2 next to VBMI, which rules out a partial AVX-512 implementation on the test box:

Xeon Platinum 8481C host showing the avx512f, avx512bw, avx512vbmi and bmi2 CPU flags Java4Shell needs

Elasticsearch, OpenSearch and Logstash each run the JDK in their own jdk/ directory, so apt or dnf upgrades on the host never reach it. Ask the bundled binary directly. For the Docker image that is:

docker run --rm --entrypoint /usr/share/elasticsearch/jdk/bin/java docker.elastic.co/elasticsearch/elasticsearch:9.5.6 -version

The 9.5.6 image reports 27.0.1.0.3, which is exactly the last affected 27 build in the OpenJDK advisory:

openjdk version "27.0.1.0.3" 2026-10-25
OpenJDK Runtime Environment (build 27.0.1.0.3+1-2)
OpenJDK 64-Bit Server VM (build 27.0.1.0.3+1-2, mixed mode, sharing)

Adding -XX:+PrintFlagsFinal to the same call shows the intrinsic is on by default, with UseAVX at 3 on this CPU:

Elasticsearch 9.5.6 bundled OpenJDK 27.0.1.0.3 with UseBASE64Intrinsics true by default

On a package or tarball install the path is /usr/share/elasticsearch/jdk/bin/java as well, unless you run your own JDK through ES_JAVA_HOME. A running cluster answers the same question for every node at once through GET _nodes/jvm, which is the check we use from Step 3 on. On the 3-node lab cluster, before any change, every node reported the vulnerable build and no flag:

curl -s 'localhost:9200/_nodes/jvm?filter_path=nodes.*.name,nodes.*.jvm.version,nodes.*.jvm.input_arguments&pretty' | grep -E '"name"|"version"|UseBASE64|Xmx'

Each node lists its heap flag and nothing else from the grep, so the decoder intrinsic is on everywhere:

      "name" : "es01",
        "version" : "27.0.1.0.3",
          "-Xmx1g",
      "name" : "es03",
        "version" : "27.0.1.0.3",
          "-Xmx1g",
      "name" : "es02",
        "version" : "27.0.1.0.3",
          "-Xmx1g",

Our lab cluster ran with security disabled to keep the requests short. On a default install, send the same requests over HTTPS as an administrator such as the elastic user, as Step 5 does on ECK.

Step 2: Write the jvm.options.d file

Elasticsearch reads every file in config/jvm.options.d/ whose name ends in .options, one JVM flag per line. A dedicated file keeps the change out of jvm.options, which Elastic says not to edit, and makes the rollback a single rm. On a package install the directory is /etc/elasticsearch/jvm.options.d/:

echo '-XX:-UseBASE64Intrinsics' | sudo tee /etc/elasticsearch/jvm.options.d/cve-2026-114938.options

For Docker, mount a directory that holds the file onto /usr/share/elasticsearch/config/jvm.options.d. Our Compose cluster mounted one directory per node, so each node could pick up the file on its own restart and the change could roll one node at a time. Create the Compose file:

vim compose.yaml

This is the exact file the lab cluster ran:

x-es: &es
  image: docker.elastic.co/elasticsearch/elasticsearch:9.5.6
  environment: &esenv
    cluster.name: logs
    discovery.seed_hosts: es01,es02,es03
    cluster.initial_master_nodes: es01,es02,es03
    xpack.security.enabled: "false"
    ES_JAVA_OPTS: "-Xms1g -Xmx1g"
  ulimits:
    memlock: { soft: -1, hard: -1 }

services:
  es01:
    <<: *es
    environment: { <<: *esenv, node.name: es01 }
    ports: ["9200:9200"]
    volumes: ["es01-data:/usr/share/elasticsearch/data", "./es01/jvm.options.d:/usr/share/elasticsearch/config/jvm.options.d"]
  es02:
    <<: *es
    environment: { <<: *esenv, node.name: es02 }
    volumes: ["es02-data:/usr/share/elasticsearch/data", "./es02/jvm.options.d:/usr/share/elasticsearch/config/jvm.options.d"]
  es03:
    <<: *es
    environment: { <<: *esenv, node.name: es03 }
    volumes: ["es03-data:/usr/share/elasticsearch/data", "./es03/jvm.options.d:/usr/share/elasticsearch/config/jvm.options.d"]

volumes: { es01-data: {}, es02-data: {}, es03-data: {} }

The container runs as UID 1000, so the file has to be world-readable, which echo into a new file gives you with the default umask. Adding the flag to ES_JAVA_OPTS also works, as Step 5 shows for ECK, but in Compose it changes every node’s definition at once, and docker compose up -d then recreates all three together.

Step 3: Roll the flag one node at a time

If a node stays down longer than index.unassigned.node_left.delayed_timeout (one minute by default), the cluster starts copying its replicas elsewhere, then copies them back. Setting allocation to primaries first stops that, and a flush shortens recovery when the node returns. This is Elastic’s rolling restart procedure, and we ran it on es03 first:

curl -s -X PUT 'localhost:9200/_cluster/settings?pretty' -H 'Content-Type: application/json' -d '{"persistent":{"cluster.routing.allocation.enable":"primaries"}}' | grep -E 'acknowledged|enable'

The setting is acknowledged and now reads primaries:

  "acknowledged" : true,
          "enable" : "primaries"

Flush, write the file into es03’s directory, and restart only that container:

curl -s -X POST 'localhost:9200/_flush?pretty' | grep -E 'failed'
echo '-XX:-UseBASE64Intrinsics' > ~/es/es03/jvm.options.d/cve-2026-114938.options
cd ~/es && docker compose restart es03

Once es03 is back in _cat/nodes, read its JVM arguments. This is the check Elastic asks for, and it is the one to keep for your change record:

curl -s 'localhost:9200/_nodes/es03/jvm?filter_path=nodes.*.name,nodes.*.jvm.input_arguments&pretty' | grep -E '"name"|UseBASE64'

The flag is in es03’s input arguments:

      "name" : "es03",
          "-XX:-UseBASE64Intrinsics",

At this point the cluster is yellow, and that is expected. The three replica shards that lived on es03 are waiting for allocation to be enabled again:

  "status" : "yellow",
  "unassigned_shards" : 3,
  "delayed_unassigned_shards" : 3,

Reset allocation to its default and wait for green before you touch the next node:

curl -s -X PUT 'localhost:9200/_cluster/settings?pretty' -H 'Content-Type: application/json' -d '{"persistent":{"cluster.routing.allocation.enable":null}}' | grep acknowledged
curl -s 'localhost:9200/_cluster/health?wait_for_status=green&timeout=120s&pretty' | grep -E '"status"|unassigned_shards|timed_out'

The replicas came back in place and the health call returned green without timing out:

  "acknowledged" : true,
  "status" : "green",
  "timed_out" : false,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,

We repeated the same sequence for es02 and then es01, the elected master, last. Restarting the master moved the election to es02 and the cluster returned to green each time. The 500 documents indexed before the roll were all still there afterwards, and every node now carried the flag on the same vulnerable JDK:

      "name" : "es01",
        "version" : "27.0.1.0.3",
          "-XX:-UseBASE64Intrinsics",
      "name" : "es03",
        "version" : "27.0.1.0.3",
          "-XX:-UseBASE64Intrinsics",
      "name" : "es02",
        "version" : "27.0.1.0.3",
          "-XX:-UseBASE64Intrinsics",

Leave the master for last. Each master restart forces an election, and doing it once at the end costs one election instead of up to three. If you run dedicated master nodes, roll the data nodes first and the masters after, one at a time.

Step 4: Confirm the live JVM with jcmd

_nodes/jvm shows the arguments the node started with. jcmd asks the running JVM what it actually did with them, which also proves the flag name was spelled right, since a misspelt -XX option stops the JVM from starting rather than being ignored. The Elasticsearch image ships jcmd in its bundled JDK. Find the server process first:

docker exec es-es03-1 jdk/bin/jps -l

The server is the bootstrap.Elasticsearch class, PID 60 in this container:

60 org.elasticsearch.server/org.elasticsearch.bootstrap.Elasticsearch
205 jdk.jcmd/sun.tools.jps.Jps

Ask that PID for the flag, without hard-coding the number:

docker exec es-es03-1 sh -c 'jdk/bin/jcmd $(jdk/bin/jps -l | awk "/bootstrap.Elasticsearch/{print \$1}") VM.flags -all' | grep UseBASE64Intrinsics

The intrinsic is off, and the source column says it came from the command line, which is where the launcher puts jvm.options.d entries:

     bool UseBASE64Intrinsics                      = false                                     {product} {command line}

The whole session on es03, with VM.version confirming the node still runs the vulnerable 27.0.1.0.3 build underneath the flag:

jcmd VM.flags on an Elasticsearch node showing UseBASE64Intrinsics false from the command line

Without the flag, the same trigger reproduced on all four unpatched images, five runs each:

Calif Base64 trigger printing REPRODUCED five times each on Elasticsearch 9.5.6, 8.19.25, OpenSearch 3.10.0 and Logstash 9.5.6

With the flag set, Calif’s trigger agreed with jcmd. With -XX:-UseBASE64Intrinsics on the command line it printed NOT REPRODUCED in 3 of 3 runs on both the Elasticsearch 9.5.6 and OpenSearch 3.10.0 JDKs, against REPRODUCED in every run without the flag. We ran Calif’s file unchanged and do not reproduce it here; the Calif write-up has it. Treat a REPRODUCED as proof that a JVM is exposed, and keep the build string plus the jcmd line as evidence that it is not, because the trigger misses on some vulnerable builds, as our RHEL, Rocky and AlmaLinux lab found, and cannot see Java 17 at all.

Step 5: Set the flag on ECK

On Elastic Cloud on Kubernetes the flag goes into ES_JAVA_OPTS in the nodeSet’s pod template. If the variable already sets the heap, append to it. Elastic’s ECK instructions say not to add a second ES_JAVA_OPTS entry. We ran ECK 3.5.0 on a kind cluster on the same c3 host, so every pod landed on an AVX-512 VBMI CPU:

kubectl exec logs-es-default-0 -c elasticsearch -- grep -c avx512vbmi /proc/cpuinfo

The pod sees the host CPU, so the count matches the host:

8

Open the Elasticsearch resource:

vim eck-es.yaml

This is the resource after the change, with the flag appended to the heap settings it already carried:

apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: logs
spec:
  version: 9.5.6
  nodeSets:
  - name: default
    count: 3
    config:
      node.store.allow_mmap: false
    podTemplate:
      spec:
        containers:
        - name: elasticsearch
          env:
          - name: ES_JAVA_OPTS
            value: "-Xms1g -Xmx1g -XX:-UseBASE64Intrinsics"
          resources:
            requests: { memory: 2Gi, cpu: 500m }
            limits: { memory: 2Gi }

Apply it and the operator does the rolling restart for you:

kubectl apply -f eck-es.yaml

ECK replaced one pod at a time, highest ordinal first, and only took the next pod down once health was back to green. Polling every 10 seconds, we saw health go yellow during each restart and never red, and the resource went from ApplyingChanges at 09:49:22 to Ready at 09:53:16 UTC. The pod start times show the spacing, 77 to 78 seconds per node:

kubectl get pods -l elasticsearch.k8s.elastic.co/cluster-name=logs -o custom-columns=NAME:.metadata.name,STARTED:.status.startTime

Pod 2 restarted first and pod 0 last, 2 minutes 35 seconds after it, on nodes with a 1 GB heap and a few hundred documents:

NAME                STARTED
logs-es-default-0   2026-11-19T09:52:47Z
logs-es-default-1   2026-11-19T09:51:30Z
logs-es-default-2   2026-11-19T09:50:12Z

ECK keeps security on, so the check runs inside a pod with the elastic user’s password from the secret the operator created:

PW=$(kubectl get secret logs-es-elastic-user -o go-template='{{.data.elastic | base64decode}}')
kubectl exec logs-es-default-0 -c elasticsearch -- curl -sk -u "elastic:$PW" 'https://localhost:9200/_nodes/jvm?filter_path=nodes.*.name,nodes.*.jvm.version,nodes.*.jvm.input_arguments&pretty' | grep -E '"name"|"version"|UseBASE64'

All three pods report the flag, and the resource went back to green with phase Ready:

      "name" : "logs-es-default-0",
        "version" : "27.0.1.0.3",
          "-XX:-UseBASE64Intrinsics",
      "name" : "logs-es-default-1",
        "version" : "27.0.1.0.3",
          "-XX:-UseBASE64Intrinsics",
      "name" : "logs-es-default-2",
        "version" : "27.0.1.0.3",
          "-XX:-UseBASE64Intrinsics",

Per Elastic’s instructions, Logstash on ECK takes the same change in LS_JAVA_OPTS in the Logstash resource’s pod template. Now that the fixed releases are out, change spec.version first and remove the flag in a second edit. On the Elasticsearch resource, confirm jvm.version is 27.0.1.1 or later on every pod before that second edit. Logstash 9.5.7 keeps Temurin 21.0.13+9, so its pods never report 27.0.1.1: check instead that -XX:-UseBASE64Intrinsics still appears in the pod’s JVM bootstrap flags log line, which the 9.5.7 launcher adds on its own, before you drop it from LS_JAVA_OPTS. Elastic’s advice is to remove the option after the upgrade, and the operator rolls every pod before you could check one.

Step 6: Mitigate OpenSearch

OpenSearch inherited the same launcher design from Elasticsearch 7.10, so the same two routes work: a file in config/jvm.options.d/ or the OPENSEARCH_JAVA_OPTS variable. On a package install the directory is /etc/opensearch/jvm.options.d/, and the rolling restart from Step 3 applies unchanged, with the same allocation setting. We started a 3.10.0 node with the variable:

docker run -d --name os-opts -p 9202:9200 -e discovery.type=single-node -e DISABLE_SECURITY_PLUGIN=true -e DISABLE_INSTALL_DEMO_CONFIG=true -e OPENSEARCH_JAVA_OPTS='-Xms1g -Xmx1g -XX:-UseBASE64Intrinsics' opensearchproject/opensearch:3.10.0

Then read the node’s JVM version and arguments:

curl -s 'localhost:9202/_nodes/jvm?filter_path=nodes.*.jvm.version,nodes.*.jvm.input_arguments&pretty' | grep -E '"version"|UseBASE64|Xmx'

The node runs the vulnerable 25.0.5 with the flag in place. -Xmx1g appears twice because the image’s default jvm.options sets it too, and the later value wins:

        "version" : "25.0.5",
          "-Xmx1g",
          "-Xmx1g",
          "-XX:-UseBASE64Intrinsics",

jcmd against the OpenSearch main class in that container returned UseBASE64Intrinsics = false {product} {command line}, and a node started with a mounted jvm.options.d file gave the same result. OpenSearch’s maintainers have said only that 3.10.0 shipped before Temurin’s fixed builds, so plan on the flag in Docker until a release with Temurin 25.0.5.1 or later appears on the tracking issue. On 23 November the issue was still open, 3.10.0 was still the newest release, and the opensearchproject/opensearch:latest image still reported Temurin 25.0.5+8. Temurin’s fixed 25.0.5.1+2 and 21.0.13.1+2 builds shipped on 18 November, so on tarball and package installs you can point OPENSEARCH_JAVA_HOME at one of them now; we did not test that path. Note that the stopgap proposed in opensearch-build#6572 uses JAVA_TOOL_OPTIONS, which the OpenSearch launcher ignores, as shown above.

Step 7: Mitigate Logstash

Logstash needs the flag only where it runs the elastic_integration filter on Base64 data it does not control, and the worst case there is a crash. We would still set it on every Logstash node on a VBMI CPU, because it costs one line and nobody keeps an accurate list of which pipelines decode what. Add -XX:-UseBASE64Intrinsics as its own line in /etc/logstash/jvm.options on a package install, or pass it in LS_JAVA_OPTS for Docker:

docker run -d --name ls -e LS_JAVA_OPTS='-XX:-UseBASE64Intrinsics' -e XPACK_MONITORING_ENABLED=false docker.elastic.co/logstash/logstash:9.5.6 -e 'input { generator { count => 1 } } output { stdout { codec => dots } }'

Logstash prints its JVM flags once at startup, and that log line is the check Elastic gives for it:

docker logs ls 2>&1 | grep -oE 'JVM bootstrap flags: .*' | tr ',' '\n' | grep -E 'UseBASE64|bootstrap'

The flag sits in the bootstrap list right after the heap setting:

JVM bootstrap flags: [-Xms1g
 -XX:-UseBASE64Intrinsics

On Logstash 9.5.7 the same grep shows the flag with no LS_JAVA_OPTS set at all, because the launcher now adds it by default. Keep the variable on older Logstash nodes until they are upgraded.

Logstash 9.5.7 JVM bootstrap flags log line listing -XX:-UseBASE64Intrinsics by default

The flag lands right after -Xms1g in the bootstrap list, and the “Starting Logstash” line under it confirms the container ran 9.5.7.

Two ways the flag silently does nothing

Both of these left a node fully vulnerable while it started and served traffic normally, and neither shows up unless you read the live flag.

warning: ignoring JAVA_TOOL_OPTIONS

The generic Java4Shell advice is to set JAVA_TOOL_OPTIONS=-XX:-UseBASE64Intrinsics, because every HotSpot JVM reads it. Elasticsearch’s launcher ignores it for the server process, and says so in one line of the container log that is easy to miss:

warning: ignoring JAVA_TOOL_OPTIONS=-XX:-UseBASE64Intrinsics; pass JVM parameters via ES_JAVA_OPTS
Picked up JAVA_TOOL_OPTIONS: -XX:-UseBASE64Intrinsics
     bool UseBASE64Intrinsics                      = true                                      {product} {default}

The Picked up line comes from the launcher JVM, which did read the variable. The server JVM, the one that decodes requests, kept the intrinsic on with its default value. OpenSearch 3.10.0 printed the same warning: ignoring JAVA_TOOL_OPTIONS and also kept the intrinsic on. If a fleet-wide rollout set the variable through a systemd drop-in or a Kubernetes env block, every Elasticsearch and OpenSearch node it reached is still exposed. Move the flag to jvm.options.d, ES_JAVA_OPTS or OPENSEARCH_JAVA_OPTS.

A file named .conf in jvm.options.d

Only files ending in .options are read. We mounted the same single line as cve-2026-114938.conf and started a node: it came up normally, and the count of UseBASE64 in its input arguments was 0. A config management run that templates the file with the wrong suffix reports success and changes nothing, so make the _nodes/jvm check part of the same run.

Upgrade to the fixed releases

Elastic named four releases that bundle JDK 27.0.1.1+4: 8.19.26, 9.4.10, 9.5.7 and 9.6.0. The first three were available on 23 November 2026: 9.5.7 and 8.19.26 as tagged releases (the v9.5.7 tag went up at 13:21 UTC), and 9.4.10 as an image and a release notes entry ahead of its tag. The 9.x release notes list “Bump bundled JDK to 27.0.1.1” for both 9.5.7 and 9.4.10, and the 8.19.26 notes carry the same line. The 9.6.0 tag was not on docker.elastic.co that day. We pulled each new image on a c3 amd64 host and a c4a arm64 host, and all three report the same build on both:

docker run --rm --entrypoint /usr/share/elasticsearch/jdk/bin/java docker.elastic.co/elasticsearch/elasticsearch:9.5.7 -version

The JDK reports the 27.0.1.1 build dated 17 November, the day OpenJDK published its advisory:

openjdk version "27.0.1.1" 2026-11-17
OpenJDK Runtime Environment (build 27.0.1.1+4-22)
OpenJDK 64-Bit Server VM (build 27.0.1.1+4-22, mixed mode, sharing)

Looping over the three fixed tags on the c3 host gives the identical build for each:

Elasticsearch 9.5.7, 8.19.26 and 9.4.10 images reporting bundled OpenJDK 27.0.1.1+4-22

The arm64 images on the c4a host (Neoverse-V2) report the same build. ARM never generates the vulnerable stub, but a mixed fleet upgrades to one version either way:

Fixed Elasticsearch images on an arm64 Neoverse-V2 host reporting OpenJDK 27.0.1.1+4-22

The fix does not switch the intrinsic off. UseBASE64Intrinsics still reads true {default} in 9.5.7, so a scanner that flags the flag alone will report a false positive. The fix is in the decoder code itself: Calif’s trigger, run 5 times against each of 9.5.7, 9.4.10 and 8.19.26 on the same Sapphire Rapids CPU, printed NOT REPRODUCED every time, with changed=0 on every run we printed in full. Logstash 9.5.7 took the other route. Its bundled Temurin 21.0.13+9 is unchanged and still reproduces when run directly, but a 9.5.7 container started with no options of our own listed -XX:-UseBASE64Intrinsics among the JVM bootstrap flags in its log.

Calif Java4Shell trigger on Elasticsearch 9.5.7 printing changed=0 and NOT REPRODUCED

On the vulnerable build the same file reports 62 changed bytes between offsets 50 and 111. Here first and last stay at -1 because nothing was written in the checked range from offset 50 onward.

Upgrade with the same rolling procedure as the stopgap, one node at a time. Once a node rejoins, confirm its JVM from the cluster API:

curl -s 'localhost:9200/_nodes/jvm?filter_path=nodes.*.jvm.version,nodes.*.jvm.vm_version&pretty'

A 9.5.7 node answers with the fixed build in both fields. Match a scanner report against vm_version, which carries the full +4-22 build string, and treat any node still showing 27.0.1.0.3 as unpatched no matter what its Elasticsearch version claims:

{
  "nodes" : {
    "FuKKwxuTSzaXS_Y0AyEXjw" : {
      "jvm" : {
        "version" : "27.0.1.1",
        "vm_version" : "27.0.1.1+4-22"
      }
    }
  }
}

Here is the single-node 9.5.7 run that produced it, with the build date from the root endpoint:

Elasticsearch 9.5.7 node _nodes/jvm API returning jvm.version 27.0.1.1

Run the full set of checks on every node before you remove the options file. The JDK check proves the binary is fixed, while the input arguments and the live flag tell you whether the old stopgap is still in force on that node:

CheckCommandPass
Bundled JDK per nodeGET _nodes/jvm, field jvm.version27.0.1.1 or later (Elasticsearch), 25.0.5.1 or later (OpenSearch 3.x), 21.0.13.1 or later (OpenSearch 2.x)
Flag still presentGET _nodes/jvm, field jvm.input_argumentsRemove the options file once the JDK passes
Live flagjcmd <pid> VM.flags -allfalse while mitigated, true {default} after the file is gone
Cluster healthGET _cluster/healthgreen before the next node

Keep the options file through the upgrade and delete it in a later rolling restart, or in the same one if you can confirm the new JDK on the first node before rolling the rest. The flag is harmless on a fixed JDK, so leaving it a day longer costs only the slower portable decoder. For the rest of the fleet, our guides to the Java base images in Docker and Kubernetes, the Debian Java4Shell fix and the RHEL, Rocky and AlmaLinux fix cover the JVMs outside Elasticsearch, and the multi-node Elasticsearch cluster guide sets up the same topology on packages instead of Docker.

Keep reading

Java4Shell (CVE-2026-114938): Find and Patch Vulnerable JVMs Security Java4Shell (CVE-2026-114938): Find and Patch Vulnerable JVMs UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 Security UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 nginx HTTP/2 RCE CVE-2026-123007: Check, Disable HTTP/2, Patch Security nginx HTTP/2 RCE CVE-2026-123007: Check, Disable HTTP/2, Patch GL.iNet Security Notice: Check Your Router for Malware and Update Networking GL.iNet Security Notice: Check Your Router for Malware and Update Flatpak 1.18.6 Sandbox Escape CVEs: Check Version and Patch Security Flatpak 1.18.6 Sandbox Escape CVEs: Check Version and Patch Setup Local ad blocker on Linux | macOS using Maza macos Setup Local ad blocker on Linux | macOS using Maza

Leave a Comment

Press ESC to close