Java4Shell OpenJDK Base64 Overflow Reproduced on AVX-512 VBMI Systems

Summary
Varonis reproduced Java4Shell, a 64-byte heap overflow in OpenJDK Base64 decoding on affected JDKs with AVX-512 VBMI. The article identifies fixed builds and the JVM flag mitigation, but says it did not test the reported RCE chain.
Key points
- Malformed Base64 padding can trigger an out-of-bounds write in OpenJDK's AVX-512 VBMI Base64 decoding path.
- Varonis reproduced a 64-byte overflow on a vulnerable Temurin 17 build; a clean build did not overflow.
- Exposure requires an affected JDK and a CPU supporting AVX-512 VBMI. The article lists OpenJDK 17.0.6 and later, 21, 25, and 27.
- The article names Keycloak, Jira, and Confluence among products exposed before authentication, and notes conditional exposure in Java-based databases and related tools.
- Setting -XX:-UseBASE64Intrinsics stopped the overflow in the test; the article recommends upgrading to a fixed JDK build.
- The article lists fixed builds as 17.0.21.1, 21.0.13.1, 25.0.5.1, and 27.0.1.1.
- The authors did not reproduce the heap-grooming, memory-disclosure, or remote-code-execution stages described in other research.
Article Details
- Vulnerability Types
- Heap buffer overflow
- Out-of-bounds write
- Memory corruption
- Severity
- Near-maximum CVSS for pre-authentication cases; exact score not stated.
- Affected Versions
- OpenJDK 17.0.6 and later on x86-64 hardware with AVX-512 VBMI
- OpenJDK 21, 25, and 27 on x86-64 hardware with AVX-512 VBMI
- Exploitation Status
- reported
- Exploit Availability
- public_poc
- Patch Status
- available
- Workarounds
- Set the JVM flag -XX:-UseBASE64Intrinsics to disable the Base64 intrinsic until a fixed JDK build can be installed.
MITRE ATT&CK
Vendors
Products
Apache Solrbe exposed, depending on whether attacker-controlled Base64 reaches the vulnerable path. Elasticsearch and Solr are on the list below, and Cassandra, Neo4j, HBase, and embedded databases like H2, HSQLDB, and Derby areAtlassian JiraBase64 on those chips can corrupt memory, and several widely used enterprise products, including Keycloak, Jira, and Confluence, are exposed to it before authentication. Much of the early coverage has focused on thoseConfluencechips can corrupt memory, and several widely used enterprise products, including Keycloak, Jira, and Confluence, are exposed to it before authentication. Much of the early coverage has focused on those applicationElasticsearchdatabase may be exposed, depending on whether attacker-controlled Base64 reaches the vulnerable path. Elasticsearch and Solr are on the list below, and Cassandra, Neo4j, HBase, and embedded databases like H2, HSQLDB,Gerritas exposed pre-authentication. Post-auth exposure has also been flagged for Kafka, Solr, Elasticsearch, Gerrit, and Spinnaker.JenkinsPay particular attention if you run Keycloak, Jira, Confluence, Artifactory, Jenkins, or PingFederate, since those are the products called out as exposed pre-authentication. Post-auth exposure has also been flagged forJFrog ArtifactoryPay particular attention if you run Keycloak, Jira, Confluence, Artifactory, Jenkins, or PingFederate, since those are the products called out as exposed pre-authentication. Post-auth exposure has also been flagged forKafkaare the products called out as exposed pre-authentication. Post-auth exposure has also been flagged for Kafka, Solr, Elasticsearch, Gerrit, and Spinnaker.Keycloakdecodes Base64 on those chips can corrupt memory, and several widely used enterprise products, including Keycloak, Jira, and Confluence, are exposed to it before authentication. Much of the early coverage has focusedOpenJDKlast week. Whether you're exposed depends on two things: your Java version and your CPU. If you run OpenJDK 17, 21, 25, or 27 on a processor that supports AVX-512 VBMI, you probably want to read this.PingFederatePay particular attention if you run Keycloak, Jira, Confluence, Artifactory, Jenkins, or PingFederate, since those are the products called out as exposed pre-authentication. Post-auth exposure has also been flagged forSpinnakerPost-auth exposure has also been flagged for Kafka, Solr, Elasticsearch, Gerrit, and Spinnaker.Temurinset (confirmed via proc/cpuinfo: avx512f, avx512bw, avx512vbmi, bmi2), installed the latest vulnerable Temurin 17 build, and installed a clean pre-vulnerability build alongside it for comparison. Then we ran the
