Java4Shell (OpenJDK)
Java4Shell: CVE-2026-114938, OpenJDK Base64 decoder
Java4Shell: OpenJDK Base64 intrinsic out-of-bounds write
On x86-64 processors with AVX-512 VBMI (Intel Ice Lake or newer, AMD Zen 4 or newer), the JIT's fast path for java.util.Base64 decoding can write past the end of its buffer when it decodes input an attacker chose. Tokens, authorization headers, SAML and uploads all go through Base64, and researchers showed it against Jira, Confluence, Artifactory and Jenkins. ARM servers and older x86 processors never take that path.
| CVE | CVE-2026-114938 |
|---|---|
| Severity | 8.1 (Oracle, CVSS 3.1); 9.2 (researchers, CVSS 4.0) |
| Affected | Java 17.0.6 and later, 21, 25 and 27 from any vendor without the November 2026 fix; Oracle's Java 8 Performance Pack; Oracle GraalVM for JDK 17 and 21. Standard Java 8 and 11 are not affected |
| Fixed | Oracle 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1 (17 November 2026); Corretto the same day; Temurin, Red Hat, Ubuntu and Debian builds followed |
| Exploited | No; memory-corruption proof of concept public |
| Workaround | -XX:-UseBASE64Intrinsics (AWS; not an official Oracle workaround), needs a restart |
Bundled Java. Jira, Confluence, Artifactory, Jenkins and many others ship their own Java. Updating the system Java does not fix them: update the product, or its bundled runtime. check finds those copies too.
Quick start
-
Download the script. The repository is mirrored on GitHub and Codeberg; pick a base URL.
# BASE from GitHub: https://raw.githubusercontent.com/PrivacySafe/security-patches/refs/heads/main # BASE from Codeberg: https://codeberg.org/PrivacySafe/security-patches/raw/branch/main curl -fLO https://raw.githubusercontent.com/PrivacySafe/security-patches/refs/heads/main/runtimes/java/java4shell-check.sh -
Read it before running it, then make it executable.
less java4shell-check.sh chmod +x java4shell-check.sh -
Check this machine: its CPU, every Java runtime, and every running JVM. Run it on every node, because clusters often mix CPU generations.
sudo ./java4shell-check.sh check -
If you cannot update yet, set the workaround flag for the running services, and restart them.
sudo ./java4shell-check.sh mitigate --dry-run sudo ./java4shell-check.sh mitigate --restart
Commands
| Command | What it does |
|---|---|
check (default) |
Reads the CPU flags; finds every Java runtime under ROOTS (default /usr/lib/jvm /opt /srv /usr/local /var/lib /home) and judges it by its release file, without running it, and a distribution package also by its changelog; lists every running JVM and whether its command line or environment already carries -XX:-UseBASE64Intrinsics. Read-only. Exits 0 if nothing is exposed, 1 for an affected runtime on a CPU with AVX-512 VBMI (or one whose flags could not be read), 2 if a runtime could not be judged |
mitigate [--dry-run] [--restart] |
For each running systemd service whose Java is affected and lacks the flag, adds a drop-in (/etc/systemd/system/UNIT.d/90-psf-java4shell.conf) that sets JAVA_TOOL_OPTIONS to the service's own value plus -XX:+IgnoreUnrecognizedVMOptions -XX:-UseBASE64Intrinsics, and reloads systemd. Nothing is restarted unless you add --restart. Java started any other way is listed with the flag to add. Takes the shared lock |
rollback [--dry-run] [--restart] |
Removes those drop-ins and reloads systemd |
version |
Prints the script version |
Environment: ROOTS, MAX_DEPTH, CPUINFO_FILE, DROPIN_ROOT, STATE_DIR, PSF_LOCK_WAIT.
How to read the result
The CPU decides whether an affected Java is exposed today: the vulnerable path runs only with AVX-512 VBMI. A runtime that is affected on a CPU without it is reported but does not fail the check, because nothing reaches the bug there. Update it anyway: a migration, a cluster node or a new instance type can have the flag. Vendors number their builds differently (Corretto 21.0.13.1.2, Ubuntu 21.0.13.1+2); the first four parts are compared, and a distribution package whose changelog names CVE-2026-114938 is fixed whatever its number.
-XX:+IgnoreUnrecognizedVMOptions makes a JVM that does not know the flag start anyway, so a service that also runs an old Java is not broken by the drop-in.
Sources: OpenJDK advisory, AWS bulletin (CPU condition, flag), Red Hat RHSB-2026-018, Ubuntu, Debian, Adoptium and the original disclosure. Status current on 23 November 2026.
Red Hat advisories
Red Hat's advisory list (security advisories released 2026-04-01 to 2026-11-25) names the CVEs below. A Red Hat build is judged by its RPM release, not by the upstream version number, because Red Hat backports fixes: the advisory names the release that fixes it. A CVE with no advisory in the list has none for that period, which is not the same as not affected. The current state is on Red Hat's CVE database.
These are the OpenJDK 17, 21 and 25 builds for RHEL 8, 9 and 10 and for the Hummingbird images.
- CVE-2026-114938: 27 advisories, 2026-11-18 to 2026-11-24; 27 critical; by stream, RHEL 8 2, RHEL 9 2, RHEL 10 2, Hummingbird 4, container image 11; most often
java(10),ocp-tools-4/jenkins-agent-base-rhel9(6),ocp-tools-4/jenkins-agent-base-rhel8(4),ocp-tools-4/jenkins-rhel9(1). All of them: Red Hat's CVE page.
The Security Patches software and this documentation are dedicated to the public domain under CC0 1.0 Universal. Other pages on privacysafe.app/docs are CC BY-SA 4.0 unless the page says otherwise.