Skip to content

Firsthand.today

Java4Shell: RCE in OpenJDK when processing Base64

Summary

A remote code execution flaw in OpenJDK's AVX-512 Base64 decoder, a heap out-of-bounds write triggered while processing Base64 input. Exploit conditions are narrow but many x86-64 hosts running JDK 17.0.6 or later are exposed.

What the comments say

  • Disabling hardware-accelerated Base64 with -XX:-UseBASE64Intrinsics, or setting -XX:UseAVX=2 to drop AVX-512, mitigates the flaw; apply only on x86-64, since ARM JVMs reject the flag and fail to start.

    — mzs, kaliszad · HN
  • Semgrep's free detection scripts flag five conditions: a HotSpot-based VM (OpenJDK, Oracle JDK, GraalVM; OpenJ9 and Azul Prime are not affected), x86-64 JVM on x86-64 host, and version 17.0.6 or later below the patched release.

    — ievans · HN
  • Proxies that buffer complete request bodies, such as nginx by default, remove the release timing some grooming profiles need, so they blunt the attack but are not a full fix; a real patch should still be applied.

    — yabones · HN
  • The bug is an AVX-512-only heap out-of-bounds write, so exposure depends on running vulnerable Java on AVX-512-capable x86-64 hardware; hosts already pinned to UseAVX=2 for unrelated thermal reasons are unaffected.

    — nacnud, Sigmazero60, hypfer · HN
  • Debian shipped a patch at embargo drop while Ubuntu had not, a recurring gap that undercuts paying for Ubuntu support.

    — nikanj · HN

Join the discussion

Was this useful to you?