Laufzeit-JVMTI-Agent, der das verwundbare Base64-Decode-Intrinsic in laufenden JVMs über Compiler-Direktiven und Klassen-Retransformation deaktiviert und CVE-2026-114938 ohne Neustart patcht.
Hängt einen Agenten an eine laufende JVM an, sodass das verwundbare Intrinsic (_base64_decodeBlock, der x86_64 AVX-512 VBMI Base64-Decode-Stub) nicht mehr ausgeführt wird.
Es wird kein JVM-Speicher direkt geschrieben. Es werden ausschließlich unterstützte Schnittstellen verwendet: Compiler-Direktiven und Klassen-Retransformation.
Die Änderung existiert nur im Speicher und geht beim Neustart verloren. Fügen Sie
-XX:-UseBASE64Intrinsicsbei Ihrem nächsten Deployment zu den JVM-Startoptionen hinzu.
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 lädt das Jar und apply.sh mit dem files.xint.io Leaf-Public-Key (SPKI) gepinnt herunter (curl --pinnedpubkey, sowohl das ECDSA- als auch das RSA-Zertifikat). Anschließend verifiziert es deren SHA-256. Wenn eine Prüfung fehlschlägt, wird nichts ausgeführt.https://files.xint.io/java4shell (Installer)https://files.xint.io/java4shell.d/CVE-2026-114938.jarhttps://files.xint.io/java4shell.d/apply.shapply.sh neu bauen, aktualisieren Sie JAR_SHA256 / APPLY_SHA256 in java4shell.PINS. Für den langfristigen Einsatz bevorzugen Sie ein Zertifikat mit stabilem Schlüssel, wie etwa ein 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
Voraussetzungen:
jcmd (ein JDK) ist dort verfügbar, wo du es ausführst.| Umgebung | Wo | Befehl |
|---|---|---|
| VM / Bare Metal, Java direkt gestartet | Auf dem Server (JDK installiert) | curl -fsSL https://files.xint.io/java4shell | sudo sh |
| Docker, App-Image enthält ein JDK | Innerhalb des App-Containers | docker exec -it <ctr> sh -c 'curl -fsSL https://files.xint.io/java4shell | sh' |
| Docker, JRE-only-Image oder kein JDK auf dem Host | Privilegierter JDK-Hilfscontainer im PID-Namespace des Hosts (erfasst jede Container-JVM auf dem Host) | docker run --rm -it --privileged --pid=host eclipse-temurin:21-jdk sh -c 'curl -fsSL https://files.xint.io/java4shell | sh' |
| Host hat ein JDK | Auf dem Host als root (Container-JVMs sind ebenfalls sichtbar) | curl -fsSL https://files.xint.io/java4shell | sudo sh |
| Kubernetes, pro Pod | kubectl exec (Image enthält ein JDK) | kubectl exec -it <pod> -- sh -c 'curl -fsSL https://files.xint.io/java4shell | sh' |
| Kubernetes, pro Node | Node-Debug-Pod (funktioniert für 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 wird für die interaktive „yes“-Abfrage benötigt. Für die Automatisierung sh -s -- --yes anhängen../apply.sh --dry-run aus, dann ./apply.sh./tmp des Ziel-Containers muss beschreibbar sein (der JVM-Attach-Mechanismus verwendet es).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 läuft (jcmd selbst ist ausgeschlossen).STATUS: patched / not patched aus.jcmd im PATH und entweder root oder derselbe Benutzer wie die Ziel-JVM./proc/PID/root/tmp kopiert). Der Host benötigt dann ebenfalls ein JDK.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
Mehrere Pods gleichzeitig:
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
In den App-Images wird kein jcmd benötigt, und jede JVM auf dem Knoten wird auf einmal behandelt.
# 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
Die Ausgabe geht an stderr der Ziel-JVM und an <jar dir>/CVE-2026-114938-<pid>.log.
Zur Überprüfung: jcmd <pid> Compiler.directives_print | grep 'Base64$Decoder.decode0'
Wenn eine der folgenden Bedingungen zutrifft, gibt der Agent not exposed aus und beendet sich, ohne etwas zu ändern. force gilt trotzdem.
avx512_vbmi oder avx512bw. Dies umfasst auch AVX-512, das über UseAVX herabgestuft wurde.UseBASE64Intrinsics=false, d. h. bereits beim Start deaktiviert.Ein erneuter Lauf auf derselben JVM überspringt das Hinzufügen der Direktive (bereits vorhanden) und wiederholt nur die Deoptimierung.