Java4ShellFix
Runtime mitigation for CVE-2026-114938 ("Java4Shell"), the OpenJDK AVX-512 VBMI Base64 decode heap overflow. No restart required.
The real fix is to update Java (17.0.21.1 / 21.0.13.1 / 25.0.5.1 / 27.0.1.1+) or add
-XX:-UseBASE64Intrinsicsto your JVM args. This mod is a stopgap for when you can't do either right now.

The vulnerability
CVE-2026-114938: malformed Base64 overflows the output buffer in HotSpot's AVX-512 decode routine, corrupting the heap. In Minecraft, the server-list favicon and (modern versions) chat/profile signatures are Base64-decoded, so any server in your list can trigger it.
A JVM is exposed only if all hold: OpenJDK 17.0.6+ on an unpatched line, x86-64, and a CPU with AVX-512 VBMI (Intel Ice Lake+, AMD Zen 4+). Java 8/11, ARM, and non-AVX-512 CPUs are safe.
What this mod does
As early as the loader allows, it reports the JVM's status, then if exposed installs a HotSpot compiler directive that keeps the vulnerable method out of optimised code (and discards it if already compiled, via a class retransform). No JVM memory is written. The change is in-memory only, see Staying protected.
Crash-by-default: if the JVM is confirmed exposed and the mod can't fix it, it aborts startup so you don't run unprotected. A JVM that's already safe (patched, non-x86, no AVX-512, or -XX:-UseBASE64Intrinsics/-XX:UseAVX=2 set) is never touched. Set -Djava4shellfix.onFailure=warn to run anyway.
Configuration
System properties, or config/java4shellfix.properties (keys without the java4shellfix. prefix):
| Property | Default | Meaning |
|---|---|---|
java4shellfix.onFailure |
crash |
crash or warn when exposed and unmitigated. |
java4shellfix.selfAttach |
true |
Allow the retransform cleanup for a late start. |
java4shellfix.selfTest |
false |
Log a post-mitigation verification line. |
java4shellfix.debug |
false |
Verbose (also via MCMODDING_DEBUG_MODE). |
Staying protected
The mitigation is lost on restart. Update Java, or add -XX:-UseBASE64Intrinsics to the startup options, to stay protected permanently.
Supported platforms
One jar for Fabric, Quilt, Forge (1.7.10 to 1.21, including lwjgl3ify) and NeoForge. Cleanroom and other hardened FML forks that reject the modern mod metadata use the -legacy jar from the same release.
Building
./gradlew build → build/libs/.
Credits
Technique reimplemented from, and credited to, Theori/Xint's runtime patch for this CVE (no shared code).
License
LGPLv3.


