Java4Shell: How 64 Letter As and an Equals Sign Broke Modern Java
A flaw in the JVM's Base64 decoder, when using AVX-512 instructions, can write up to 64 bytes out of bounds, allowing pre-authentication remote code execution on affected Java 17+ systems. An attacker could exploit this to compromise servers running Jira, Confluence, Jenkins, and Keycloak.
medium.com
Published on medium.com
Java4shell
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
Java4Shell (CVE-2026-114938) is a memory corruption bug inside the JVM itself. The feature at fault is the JVM's Base64 decoder, java.util.Base64, which web applications call constantly for authentication headers, session tokens and file uploads. On modern x86 hardware the JVM accelerates that decoding with an AVX-512 intrinsic (avx512vbmi), and it is that optimisation which fails.
The write-up describes the bug as granting pre-authentication remote code execution on major enterprise platforms, naming Jira, Confluence, Jenkins and Keycloak. The payload needed is a string of 64 letter As followed by a single equals sign, 65 characters in total.

Setup
The preconditions are hardware and runtime, not accounts or roles:
- A JVM running Java 17 or newer, unpatched.
- A CPU that supports AVX-512, specifically the
avx512vbmiinstruction. The write-up lists modern Intel and AMD processors. - An application that routes Base64 decoding through
java.util.Base64, which the write-up treats as the normal case for web applications handling authentication headers, session tokens and file uploads.
Anything running on the same JVM inherits the problem: Kotlin (JVM), Scala, Groovy, Clojure, JRuby and Jython workloads are all affected. Kotlin/Native and Kotlin/JS run outside the JVM and are not affected.
Teams on legacy Java 8 or Java 11, and anyone running on ARM infrastructure, are described as safe.
Finding it
The write-up frames the root cause as a performance optimisation that won over bounds checking. When the Base64 decoder reaches the tail of a payload with only a few trailing characters left, the hardware intrinsic miscalculates the remaining size. Rather than stopping cleanly, it writes up to 64 bytes out of bounds, over adjacent memory. The JVM trusted the CPU optimisation implicitly, so a managed runtime ends up with a textbook memory corruption bug.
The write-up states that a string of 64 letter As followed by a single equals sign is enough to corrupt JVM memory.
Exploitation
Step 1: Confirm the hardware supports the intrinsic
The write-up gives a direct check on the Linux host, without an enterprise scanner:
grep -o -m1 avx512vbmi /proc/cpuinfo
If the command prints avx512vbmi, the affected hardware instruction is enabled on the host.
Step 2: Confirm the runtime is unpatched
Run java -version. If it shows an unpatched Java 17 or newer build, and step 1 printed avx512vbmi, the server is exposed according to the write-up.
Step 3: Send the payload
The write-up states that a string of 64 letter As followed by a single equals sign is enough to corrupt JVM memory and achieve pre-authentication remote code execution. It does not publish a request, endpoint or parameter carrying that string.
Root cause
The Base64 decoder's AVX-512 intrinsic miscalculates the remaining size when only a few trailing characters are left in the input. It writes up to 64 bytes past the intended buffer instead of stopping. Because the bug lives in the JVM runtime rather than in application code, every language on top of the JVM that decodes Base64 through java.util.Base64 inherits it, and syntax-level safety in Kotlin, Scala, Groovy, Clojure, JRuby or Jython does not help: the overflow happens underneath, at C level.
Impact
An attacker can achieve pre-authentication remote code execution, meaning no password is required, on affected enterprise platforms including Jira, Confluence, Jenkins and Keycloak. The write-up assigns CVSS 4.0 score 9.2 and notes that crash proofs-of-concept are already circulating on GitHub. The blast radius covers any JVM workload on affected hardware, not just plain Java applications.
Fix
Apply the November 17 patches. Rebuild the containers running JVM workloads inside your clusters so the patched runtime is actually in use. If patching tonight is not possible, disable the intrinsic at startup and restart the services:
-XX:-UseBASE64Intrinsics
Variants to test
- Other JVM languages on the same host. Run the
grepandjava -versionchecks against Kotlin, Scala, Groovy, Clojure, JRuby and Jython services. A positive result isavx512vbmiprinted plus an unpatched Java 17 or newer runtime. - Container images. Check the JVM inside each container image in your clusters, not just the host. A positive result is an unpatched Java 17 or newer build in the image.
- Base64 entry points. Identify every place an application decodes Base64 from untrusted input: authentication headers, session tokens, file uploads. Identify every place an application decodes Base64 from untrusted input: authentication headers, session tokens, file uploads.
- Non-x86 and legacy fleets. Confirm which hosts are ARM or still on Java 8 or Java 11. Confirm which hosts are ARM or still on Java 8 or Java 11, which the write-up describes as safe.
What happened, in plain words
A serious security flaw was found inside Java, the software that runs a huge number of business applications. A CVE is a public catalogue number that security teams use to track a specific vulnerability, much like a case number for a crime.
The surprising part is how little it takes to trigger. A string of 64 letter As followed by a single equals sign, 65 characters in total, is enough to corrupt the memory of the Java Virtual Machine and let an attacker run their own code on the server without logging in first. Running code on someone else's machine without permission is called remote code execution, and doing it without a password is called pre-authentication.
The write-up names Jira, Confluence, Jenkins and Keycloak as major enterprise platforms affected. These are tools that companies use to track work, write documentation, build software and manage logins. The bug lives inside the JVM runtime itself, underneath those products.

The pieces you need to understand first
Before the details make sense, here are the basic ideas, explained from scratch.
The JVM. Java programs do not run directly on the computer. They run inside a program called the Java Virtual Machine, or JVM. Think of the JVM as a translator sitting between the Java code and the operating system. The JVM is supposed to be a safe place to run code: it manages memory for the program so that the program cannot accidentally scribble over other data. That promise is what this bug breaks.
Memory and buffers. A computer's memory is a long row of numbered slots. A program reserves a stretch of slots, called a buffer, to hold some data. Writing past the end of that stretch is called an out-of-bounds write, or a buffer overflow. It is like pouring a full jug of water into a small glass: the extra spills onto whatever is next to it. In memory, whatever is next to it might be another program's data or instructions the computer will later follow.
Base64. Base64 is a way of turning raw data, such as a photo or a random string of bytes, into plain text made of letters, digits and a couple of symbols. It is used everywhere on the web because some channels only carry text safely. When a web application receives Base64 text, it has to decode it back into the original bytes. The JVM has a built-in decoder for this, called java.util.Base64.
Headers, session tokens and uploads. When your browser talks to a website, it sends extra information alongside each request, called headers. A session token is a short string that proves you are already logged in, so you do not have to type your password on every page. File uploads send the contents of a file to the server. All three commonly carry Base64 text, which is why the decoder runs constantly.
AVX-512 and intrinsics. Modern processors can perform several calculations at once using special instructions. AVX-512 is a family of such instructions on modern Intel and AMD chips. When the JVM spots a job it can hand to the processor directly, it uses a shortcut called an intrinsic. The specific instruction involved here is called avx512vbmi. Think of an intrinsic as a specialist machine on a factory floor: much faster than doing the work by hand, but only if the machine is set up correctly.
Managed runtime versus C level. Java is called a managed runtime because the JVM handles memory for you. C is a lower-level language where the programmer manages memory directly. A bug that happens underneath the JVM, in the C code that talks to the processor, bypasses all of Java's safety checks.
The setup: what has to be true for this to matter
The conditions are about hardware and software versions, not about user accounts or permissions:
- The server runs an unpatched JVM on Java 17 or newer.
- The processor supports AVX-512, specifically the
avx512vbmiinstruction. The write-up lists modern Intel and AMD processors. - An application passes Base64 decoding through
java.util.Base64. The write-up treats this as the normal case for web applications handling authentication headers, session tokens and file uploads.
Anything running on the same JVM inherits the problem. That includes programs written in Kotlin (when it runs on the JVM), Scala, Groovy, Clojure, JRuby and Jython. Kotlin/Native and Kotlin/JS run outside the JVM, so they are not affected.
Teams still on the older Java 8 or Java 11, and anyone running on ARM processors (the kind used in many phones and some servers), are described as safe.
Finding the flaw: why it happens
The write-up frames the root cause as a performance optimisation that won over bounds checking. Bounds checking means confirming that a write stays inside the buffer it is meant for. The optimisation miscalculates the remaining size in one specific situation: when only a few trailing characters are left.
Base64 text is decoded in chunks. When the decoder reaches the tail end of the input and only a few trailing characters are left over, the hardware shortcut miscalculates how much is left. Instead of stopping cleanly, it writes up to 64 bytes past the end of the buffer, over whatever memory sits next to it. The JVM trusted the processor shortcut completely, so a runtime that is supposed to be safe ends up with a textbook memory corruption bug.
The write-up states that a string of 64 letter As followed by a single equals sign is enough to corrupt JVM memory.
Checking your own server
Step 1: Does the hardware support the instruction?
The write-up gives a direct check on a Linux host, so you do not need an expensive enterprise scanner. You run one command in a terminal, which is a text window where you type commands for the computer to carry out.
grep -o -m1 avx512vbmi /proc/cpuinfo
Line by line:
grepis a standard Linux tool that searches text for a pattern.-otells it to print only the matching part, not the whole line.-m1tells it to stop after the first match.avx512vbmiis the name of the processor instruction being searched for./proc/cpuinfois a file on Linux that lists what the processor can do. It is generated by the operating system, not a normal document on disk.
If the command prints avx512vbmi, the affected hardware instruction is enabled on the host. If it prints nothing, the instruction is not available there.
Step 2: Is the runtime unpatched?
Run java -version. This asks the installed Java to report its version. If it shows an unpatched Java 17 or newer build, and step 1 printed avx512vbmi, the server is exposed according to the write-up.
Step 3: The payload itself
The write-up states that a string of 64 letter As followed by a single equals sign is enough to corrupt JVM memory and achieve pre-authentication remote code execution. It does not publish a request, endpoint or parameter carrying that string. An endpoint is simply a specific address on a server that accepts a particular kind of request, like a counter in a shop that handles one service.
Why the bug reaches beyond Java
The Base64 decoder's AVX-512 shortcut miscalculates the remaining size when only a few trailing characters are left in the input. It writes up to 64 bytes past the intended buffer instead of stopping.
Because the bug lives in the JVM runtime rather than in application code, every language on top of the JVM that decodes Base64 through java.util.Base64 inherits it. Writing your application in Kotlin, Scala, Groovy, Clojure, JRuby or Jython does not help, because the overflow happens underneath, at C level. It is like a fault in the building's plumbing: it does not matter which language the tenants speak.
What an attacker could do
An attacker can achieve pre-authentication remote code execution, meaning no password is required, on affected enterprise platforms including Jira, Confluence, Jenkins and Keycloak. The write-up assigns a CVSS 4.0 score of 9.2. CVSS is a standard scoring system for how severe a vulnerability is, where higher numbers mean more danger. The write-up also notes that crash proofs-of-concept are already circulating on GitHub. A proof-of-concept is a small demonstration that shows the flaw is real, often by making the target crash.
The blast radius covers any JVM workload on affected hardware, not just plain Java applications.
How to fix it
- Apply the November 17 patches. A patch is an official update that closes the hole.
- Rebuild the containers running JVM workloads inside your clusters so the patched runtime is actually in use. A container is a packaged bundle of an application and everything it needs to run, and a cluster is a group of machines that run containers together. Rebuilding matters because an old container image keeps the old, unpatched Java inside it even after the host machine has been updated.
- If patching tonight is not possible, disable the shortcut at startup and restart the services:
-XX:-UseBASE64Intrinsics
This is a Java startup option. The -XX: prefix marks it as a JVM tuning flag. UseBASE64Intrinsics is the name of the setting that controls the Base64 hardware shortcut, and the minus sign in front of it turns the setting off. The option disables the Base64 intrinsic at startup. The services must be restarted for the option to take effect.
Other places to check
- Other JVM languages on the same host. Run the
grepandjava -versionchecks against Kotlin, Scala, Groovy, Clojure, JRuby and Jython services. A positive result isavx512vbmiprinted plus an unpatched Java 17 or newer runtime. - Container images. Check the JVM inside each container image in your clusters, not just the host. A positive result is an unpatched Java 17 or newer build in the image.
- Base64 entry points. Identify every place an application decodes Base64 from untrusted input: authentication headers, session tokens, file uploads. Identify every place an application decodes Base64 from untrusted input: authentication headers, session tokens, file uploads.
- Non-x86 and legacy fleets. Confirm which hosts are ARM or still on Java 8 or Java 11. Confirm which hosts are ARM or still on Java 8 or Java 11, which the write-up describes as safe.
Glossary
- AVX-512: a family of wide processor instructions on modern Intel and AMD chips that let the CPU do many calculations at once.
- avx512vbmi: the specific AVX-512 instruction the JVM uses to speed up Base64 decoding, and the one involved in this bug.
- Base64: a way of encoding raw bytes as plain text using letters, digits and a few symbols, widely used on the web.
- Bounds checking: confirming that a program writes only inside the memory it reserved, and not past the end.
- Buffer: a reserved stretch of computer memory used to hold data temporarily.
- Buffer overflow: writing more data than a buffer can hold, so the extra data lands in neighbouring memory.
- C level: code written in the low-level C language, where the programmer manages memory directly, underneath the JVM.
- Container: a packaged bundle of an application and everything it needs to run, kept separate from the rest of the machine.
- Cluster: a group of machines that run containers together.
- CVE: a public catalogue number for a specific security vulnerability.
- CVSS: a standard scoring system for the severity of a vulnerability, where higher numbers mean more danger.
- Endpoint: a specific address on a server that accepts a particular kind of request.
- Header: extra information a browser or program sends alongside a request, such as what format it expects.
- Intrinsic: a shortcut where the JVM hands a job directly to a special processor instruction instead of doing it in software.
- JVM (Java Virtual Machine): the program that runs Java code and manages its memory.
- Managed runtime: a runtime that handles memory for the programmer, as the JVM does for Java.
- Out-of-bounds write: writing data past the end of the memory a program reserved.
- Patch: an official software update that fixes a flaw.
- Payload: the piece of data an attacker sends to trigger a flaw.
- Pre-authentication: happening before any login or password check, so no credentials are needed.
- Proof-of-concept: a small demonstration that shows a flaw is real, often by making the target crash.
- Remote code execution: making a computer run code supplied by someone else over a network.
- Session token: a short string that proves you are already logged in, so you do not retype your password on every page.
- Terminal: a text window where you type commands for the computer to carry out.
- Vulnerability: a weakness in software that an attacker can use to cause harm.