Runtime JVMTI agent that disables the vulnerable Base64 decode intrinsic in running JVMs via compiler directives and class retransformation, patching CVE-2026-114938 without restart.
Attaches an agent to a running JVM so that the vulnerable intrinsic (_base64_decodeBlock, the x86_64 AVX-512 VBMI Base64 decode stub) is no longer executed.
No JVM memory is written directly. It uses only supported interfaces: compiler directives and class retransformation.
The change lives in memory only and is lost on restart. Add
-XX:-UseBASE64Intrinsicsto the JVM startup options in your next deployment.
curl | sh)curl -fsSL https://files.xint.io/java4shell | sh # check, then apply after typing "yes"
curl -fsSL https://files.xint.io/java4shell | sh -s -- --dry-run # check only
curl -fsSL https://files.xint.io/java4shell | sh -s -- --yes [PID ...] # apply without prompting (automation)
# To pin the installer download itself as well:
curl -fsSL --pinnedpubkey 'sha256//cPNKVMMSBKRsqcDzoa/6g1kBw43KpwPCZYPU38YC1Ig=;sha256//QYVBGSU2fPejSOSSjdZ9qAChBxEHY/8AcSb9/SSeYPQ=' https://files.xint.io/java4shell | sh
java4shell downloads the jar and apply.sh with the files.xint.io leaf public key (SPKI) pinned (curl --pinnedpubkey, both the ECDSA and the RSA certificate). It then verifies their SHA-256. If any check fails, nothing is executed.https://files.xint.io/java4shell (installer)https://files.xint.io/java4shell.d/CVE-2026-114938.jarhttps://files.xint.io/java4shell.d/apply.shapply.sh, update JAR_SHA256 / APPLY_SHA256 in java4shell.PINS. For long-term use, prefer a certificate with a stable key, such as a Cloudflare custom certificate.
openssl s_client -connect files.xint.io:443 -servername files.xint.io </dev/null 2>/dev/null \
| openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | base64
# RSA certificate: add -tls1_2 -cipher ECDHE-RSA-AES128-GCM-SHA256 to s_client
Requirements:
jcmd (a JDK) is available where you run it.| Environment | Where | Command |
|---|---|---|
| VM / bare metal, Java started directly | On the server (JDK installed) | curl -fsSL https://files.xint.io/java4shell | sudo sh |
| Docker, app image contains a JDK | Inside the app container | docker exec -it <ctr> sh -c 'curl -fsSL https://files.xint.io/java4shell | sh' |
| Docker, JRE-only image or no JDK on the host | Privileged JDK helper container in the host PID namespace (covers every container JVM on the host) | docker run --rm -it --privileged --pid=host eclipse-temurin:21-jdk sh -c 'curl -fsSL https://files.xint.io/java4shell | sh' |
| Host has a JDK | On the host as root (container JVMs are visible too) | curl -fsSL https://files.xint.io/java4shell | sudo sh |
| Kubernetes, per pod | kubectl exec (image contains a JDK) | kubectl exec -it <pod> -- sh -c 'curl -fsSL https://files.xint.io/java4shell | sh' |
| Kubernetes, per node | Node debug pod (works for JRE images) | kubectl debug node/<node> -it --profile=sysadmin --image=eclipse-temurin:21-jdk -- sh -c 'curl -fsSL https://files.xint.io/java4shell | sh' |
-it is needed for the interactive "yes" prompt. For automation, append sh -s -- --yes../apply.sh --dry-run, then ./apply.sh./tmp must be writable (the JVM attach mechanism uses it).apply.sh./apply.sh --dry-run # check all running JVMs (changes nothing)
./apply.sh # apply to all running JVMs (only exposed JVMs are changed; asks "yes")
./apply.sh 1234 5678 # specific PIDs only
./apply.sh --force 1234 # apply regardless of the checks
./apply.sh --yes # no confirmation prompt (automation)
*/bin/java (jcmd itself is excluded).STATUS: patched / not patched.jcmd on PATH, and either root or the same user as the target JVM./proc/PID/root/tmp). The host then needs a JDK as well.NS=default; POD=my-app-xxxx; C=app # container name
kubectl cp CVE-2026-114938.jar $NS/$POD:/tmp/CVE-2026-114938.jar -c $C
kubectl cp apply.sh $NS/$POD:/tmp/apply.sh -c $C
kubectl exec -n $NS $POD -c $C -- bash /tmp/apply.sh --dry-run
kubectl exec -n $NS $POD -c $C -- bash /tmp/apply.sh --yes
Multiple pods at once:
for p in $(kubectl get pods -n $NS -l app=my-app -o name); do
kubectl cp CVE-2026-114938.jar $NS/${p#pod/}:/tmp/CVE-2026-114938.jar -c $C
kubectl cp apply.sh $NS/${p#pod/}:/tmp/apply.sh -c $C
kubectl exec -n $NS ${p#pod/} -c $C -- bash /tmp/apply.sh --yes
done
No jcmd is needed in the app images, and every JVM on the node is handled at once.
# Start a node debug pod (hostPID, privileged) with a JDK image
kubectl debug node/<node> -it --profile=sysadmin --image=eclipse-temurin:21-jdk -- bash
# From another terminal, copy the package (debug pod name is printed by the command above)
kubectl cp CVE-2026-114938 <debug-pod>:/tmp/CVE-2026-114938
# Inside the debug pod
bash /tmp/CVE-2026-114938/apply.sh --dry-run # check every JVM on the node
bash /tmp/CVE-2026-114938/apply.sh # apply after confirmation ("yes")
docker cp CVE-2026-114938.jar <ctr>:/tmp/ && docker cp apply.sh <ctr>:/tmp/
docker exec -it <ctr> bash /tmp/apply.sh
jcmd <pid> JVMTI.agent_load /path/CVE-2026-114938.jar # apply
jcmd <pid> JVMTI.agent_load /path/CVE-2026-114938.jar dry-run # check only
jcmd <pid> JVMTI.agent_load /path/CVE-2026-114938.jar force # apply regardless of checks
Output goes to the target JVM's stderr and to <jar dir>/CVE-2026-114938-<pid>.log.
To verify: jcmd <pid> Compiler.directives_print | grep 'Base64$Decoder.decode0'
If any of the following is true, the agent prints not exposed and exits without changing anything. force applies anyway.
avx512_vbmi or avx512bw. This also covers AVX-512 lowered via UseAVX.UseBASE64Intrinsics=false, i.e. already disabled at startup.Running it again on the same JVM skips adding the directive (already present) and only redoes the deoptimization.