· via dev.to (home feed)
Java4Shell fixes hinge on a fourth JDK version digit that scanners can drop
Java4Shell's fixed JDK builds differ from vulnerable ones only in the rarely-read fourth version digit, which some detection scripts discard.

An AVX-512 fast path writes out of bounds
Java4Shell (CVE-2026-114938) went public on November 17 through the security firm Calif. According to a dev.to writeup published two days later, the bug sits in a hand-optimized AVX-512 Base64 decoder inside HotSpot. Once the C2 JIT compiler has compiled the decode loop, an input of 64 "A" characters followed by a single "=" makes the assembly stub compute a negative output length and store a full 64-byte vector, landing 62 bytes past the end of a 50-byte array. Calif says it turned the overflow into remote code execution in Keycloak, Jira, Jenkins and other products, and is holding those exploit chains back for now.
The repair is small. Commit 5177a70 in the main JDK repository, filed as "8393212: Base64 optimization improvements", adds a length check that hands any final fragment shorter than four characters back to the plain Java decoder instead of the assembly path. That optimized tail handling arrived in June 2021 and was backported to the JDK 17 line in November 2022, which is why Calif sets the lower bound of exposure at 17.0.6. The OpenJDK advisory lists releases 17, 21, 25 and 27 as affected, and clears 8 and 11.
One digit separates fixed from vulnerable
JEP 322 defines the JDK version format as feature.interim.update.patch, with a fifth number left to whoever builds the distribution. Oracle JDK 21.0.13.0.3 is vulnerable; 21.0.13.1 carries the fix. The same step applies to 17.0.21.1, 25.0.5.1 and 27.0.1.1, and Amazon Corretto's patched build is 21.0.13.1.2.
Tooling built on semver habits reads three numbers and throws the rest away, and the dev.to author found exactly that failure in the wild. Semgrep's free detection rules, released on disclosure day, derive their version key from only the first three numbers, so a vulnerable 21.0.13.0.3 and a patched 21.0.13.1 collapse to the same key. Before a fix existed, that merely over-flagged. Afterward it becomes a quiet miss: the scripts' README tells operators to add fixed versions to a list, and once 21.0.13.1 is on it, an unpatched 21.0.13.0.3 compares equal and reads as fixed. The post's recommendation is to let Java do the comparison, since Runtime.Version.parse orders the patch digit correctly.
A listed version is not the same as exposure
The author's own laptop ran two builds from Oracle's affected list and was still safe, because exposure requires all of the following: an x86-64 JVM on a CPU with AVX-512 VBMI support (Calif names Intel Ice Lake and later server chips plus AMD Zen 4 and later), HotSpot with C2 actually compiling the decoder, and a version from 17.0.6 up to the fix. Grepping for UseBASE64Intrinsics proves little, since the flag reads true even on ARM machines and JDK 11; asking the running JVM which CPU features it sees is the reliable check. Semgrep's README adds a surprise: AWS Lambda's Java bootstrap stops JIT tiering at level 1 by default, so C2 never compiles the decoder there unless tiering is changed.
Patch now, and mind the ARM hosts
The fix path is an upgrade to OpenJDK 17.0.21.1, 21.0.13.1, 25.0.5.1 or 27.0.1.1, or a vendor build on top of them. Corretto and Homebrew shipped on disclosure day; when the post was written, Temurin still listed an October build as its newest 21. JDK 26 will get no fix at all, because its update repository is archived, so the way out of 26 is 27.0.1.1.
Where upgrading takes longer, Calif offers two JVM flags. -XX:-UseBASE64Intrinsics started on everything the author tried. UseAVX=2 is not recognized on ARM and stops the JVM from booting, so pushing it across a mixed fleet disables the ARM half on its own.
Why it matters
Severity assessments disagree: Calif scores the bug 9.2 under CVSS 4.0, while OpenJDK and Oracle rate it 8.1 with high attack complexity, and Calif's own limitations section describes per-application heap grooming, fragile timing, and exploit chains that nginx's default request buffering can break. On Hacker News, tptacek called memory corruption in core Java Base64 remarkable yet short of Log4Shell, a view the dev.to author shares. The scope detail worth watching is client-side: Calif says a Java program that merely opens a TLS connection to a malicious server can be compromised, which pulls CI jobs, build tools and crawlers in alongside servers. The durable lesson is operational: on JDK builds the patch level hides in the fourth version digit, and any inventory or scanner that truncates it can wave a vulnerable JVM through as patched.
- #java
- #security
- #openjdk
- #vulnerability
- #patching