Agente JVMTI runtime che disabilita l'intrinseca di decodifica Base64 vulnerabile nelle JVM in esecuzione tramite direttive del compilatore e ritrasformazione delle classi, correggendo CVE-2026-114938 senza riavvio.
Collega un agent a una JVM in esecuzione in modo che l'intrinseca vulnerabile (_base64_decodeBlock, lo stub di decodifica Base64 x86_64 AVX-512 VBMI) non venga più eseguita.
Nessuna memoria della JVM viene scritta direttamente. Utilizza solo interfacce supportate: direttive del compilatore e ritrasformazione delle classi.
La modifica risiede solo in memoria e viene persa al riavvio. Aggiungi
-XX:-UseBASE64Intrinsicsalle opzioni di avvio della JVM nel prossimo 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 scarica il jar e apply.sh con la chiave pubblica leaf di files.xint.io (SPKI) fissata (curl --pinnedpubkey, sia il certificato ECDSA che quello RSA). Successivamente verifica il loro SHA-256. Se un controllo fallisce, non viene eseguito nulla.https://files.xint.io/java4shell (installer)https://files.xint.io/java4shell.d/CVE-2026-114938.jarhttps://files.xint.io/java4shell.d/apply.shapply.sh, aggiorna JAR_SHA256 / APPLY_SHA256 in java4shell.PINS. Per un utilizzo a lungo termine, preferisci un certificato con una chiave stabile, come un certificato personalizzato Cloudflare.
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
Requisiti:
jcmd (un JDK) è disponibile dove lo esegui.| Ambiente | Dove | Comando |
|---|---|---|
| VM / bare metal, Java avviato direttamente | Sul server (JDK installato) | curl -fsSL https://files.xint.io/java4shell | sudo sh |
| Docker, l'immagine dell'app contiene un JDK | All'interno del container dell'app | docker exec -it <ctr> sh -c 'curl -fsSL https://files.xint.io/java4shell | sh' |
| Docker, immagine solo JRE o nessun JDK sull'host | Container helper JDK privilegiato nel namespace PID dell'host (copre ogni JVM dei container sull'host) | docker run --rm -it --privileged --pid=host eclipse-temurin:21-jdk sh -c 'curl -fsSL https://files.xint.io/java4shell | sh' |
| L'host ha un JDK | Sull'host come root (anche le JVM dei container sono visibili) | curl -fsSL https://files.xint.io/java4shell | sudo sh |
| Kubernetes, per pod | kubectl exec (l'immagine contiene un JDK) | kubectl exec -it <pod> -- sh -c 'curl -fsSL https://files.xint.io/java4shell | sh' |
| Kubernetes, per nodo | Pod di debug sul nodo (funziona per le immagini JRE) | kubectl debug node/<node> -it --profile=sysadmin --image=eclipse-temurin:21-jdk -- sh -c 'curl -fsSL https://files.xint.io/java4shell | sh' |
-it è necessario per il prompt interattivo "yes". Per l'automazione, aggiungi sh -s -- --yes../apply.sh --dry-run, poi ./apply.sh./tmp del container di destinazione deve essere scrivibile (il meccanismo di attach della JVM la utilizza).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 stesso è escluso).STATUS: patched / not patched.jcmd nel PATH e privilegi root oppure lo stesso utente della JVM di destinazione./proc/PID/root/tmp). L'host necessita quindi anch'esso di un 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
Più pod contemporaneamente:
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
Non è necessario jcmd nelle immagini dell'app, e ogni JVM sul nodo viene gestita contemporaneamente.
# 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
L'output va su stderr della JVM di destinazione e su <jar dir>/CVE-2026-114938-<pid>.log.
Per verificare: jcmd <pid> Compiler.directives_print | grep 'Base64$Decoder.decode0'
Se una delle seguenti condizioni è vera, l'agente stampa not exposed e termina senza modificare nulla. force si applica comunque.
avx512_vbmi o avx512bw. Questo copre anche AVX-512 abbassato tramite UseAVX.UseBASE64Intrinsics=false, ovvero già disabilitato all'avvio.Eseguirlo di nuovo sulla stessa JVM salta l'aggiunta della direttiva (già presente) e ripete solo la deottimizzazione.