Repository navigation
Description
Before reporting an issue
- I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
dist/quarkus
Bug Description
A critical vulnerability (CVE-2026-114938, also known as "Java4Shell") was recently disclosed affecting OpenJDK's hardware-accelerated Base64 decoder intrinsic (java.util.Base64.Decoder) on x86-64 processors supporting AVX-512 VBMI instructions.
Security research by Calif demonstrated that in default configurations, Keycloak endpoints processing Base64 data prior to authentication (e.g. Basic auth headers, SAML assertions, and JWTs) can trigger memory corruption / heap overflow in vulnerable JVM builds.
Proposed Solution
Until upstream vendor patches are widely distributed across all base container images and environments, disable the vulnerable Base64 intrinsics by default in Keycloak startup scripts:
- Add
-XX:-UseBASE64Intrinsicsto defaultJAVA_OPTSinkc.shandkc.bat. - Include
-XX:-UseBASE64Intrinsicsin the Keycloak Operator Dockerfile entrypoint.
Version
nightly / latest
Regression
- The issue is a regression
Expected behavior
Keycloak startup scripts (kc.sh, kc.bat) and container images should include the JVM flag -XX:-UseBASE64Intrinsics by default to prevent exploitation of the OpenJDK hardware-accelerated Base64 decoder flaw (CVE-2026-114938) until vendor-patched OpenJDK packages are broadly distributed in base images.
Actual behavior
By default, Keycloak runs with OpenJDK hardware-accelerated Base64 intrinsics enabled. On x86-64 hosts equipped with AVX-512 VBMI instructions (e.g. Intel Ice Lake, AMD Zen 4), malformed Base64 payloads decoded prior to authentication can cause heap out-of-bounds write / memory corruption (CVE-2026-114938), potentially exposing Keycloak to remote code execution or denial of service before vendor JDK packages are patched.
How to Reproduce?
- Run Keycloak using OpenJDK 17 or 21 on an x86-64 host with AVX-512 VBMI instructions (e.g., Intel Ice Lake or AMD Zen 4).
- Send malformed Base64-encoded payloads in pre-authentication headers (such as HTTP Basic authorization, JWT tokens, or SAML assertions).
- The OpenJDK HotSpot C2 Base64 intrinsic calculates an incorrect negative output length and triggers a heap out-of-bounds write / memory corruption.
Anything else?
References:
- CVE-2026-114938 (Java4Shell)
- Technical analysis: https://securityonline.info/java4shell-cve-2026-114938/
- Calif Advisory: Pre-auth RCE vulnerability in OpenJDK Base64 decoding on AVX-512 VBMI CPUs.
- Recommended mitigation: pass
-XX:-UseBASE64Intrinsicsor-XX:DisableIntrinsic=_base64_decodeBlockto the JVM.
Keycloak container images for 26.8 have been updated to Red Hat OpenJDK 21.0.13.1, which includes fixes for CVE-2026-114938.
The updated tags include latest, 26.8, 26.8.2, and 26.8.2-3.
If you are not using the container images or building your own check if your OpenJDK vendor has released updates. Fixed
versions include 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1. Older releases of OpenJDK 17, 21, and 25 are affected.
As of publishing Oracle and Red Hat have released updates. Eclipse Temurin
for Linux have been released, while other platforms are in-progress.
Metadata
Metadata
Assignees
Labels
Type
Fields
Projects
- StatusShow more project fieldsDone
Activity
Mitigate CVE-2026-114938 (Java4Shell) by disabling Base64 intrinsics
[-]Mitigate OpenJDK Base64 intrinsic vulnerability (CVE-2026-114938 / Java4Shell)[/-][+][CVE-2026-114938] Mitigate OpenJDK Base64 intrinsic vulnerability (CVE-2026-114938 / Java4Shell)[/+]gillg commentedon Nov 18, 2026
Thanks for the mitigation !
Can we hope having a fresh docker image, with the JVM patched for the versions 26.x by today ?
The mitigation is fine but the patch is still safer.
Also, for long term, the mitigation may have negative impacts on perfs on Keycloak with a lot of users and tokens operations.
ptman commentedon Nov 18, 2026
For current mitigation, pass
JAVA_OPTS_APPEND="-XX:-UseBASE64Intrinsics"to the container startup (kc.sh should pick that up https://github.com/keycloak/keycloak/blob/main/quarkus/dist/src/main/content/bin/kc.sh#L132 )6 remaining items
stianst commentedon Nov 18, 2026
Fixes are in, but release are not out
shanytc commentedon Nov 18, 2026
They are too slow ugh...
dnatic09 commentedon Nov 18, 2026
RedHat is going to need to release a new hardened Docker image too.
FacuLbsz commentedon Nov 18, 2026
No patch before gta 6 🙁
AriefLuthfi79 commentedon Nov 19, 2026
Any update?
KarthickeyanSekar commentedon Nov 19, 2026
Any update on the patch release?
ptman commentedon Nov 19, 2026
RedHat OpenJDK updated https://access.redhat.com/errata/RHSA-2026:100567
batorse commentedon Nov 19, 2026
For those eager to patch, the 26.8.2-3 image was build 20 minutes ago. I assume it is patched, but for a definitive answer you will have to wait till an announcement.
In general if an open source project has an issue you are interested in, please react to via emoji to register your interest, work on a patch or contact the representative of your paid support contract. There is limited value in commenting every few hours, the maintainers might as well be asleep.
stianst commentedon Nov 19, 2026
Keycloak container images for 26.8 have been updated to Red Hat OpenJDK 21.0.13.1, which includes fixes for CVE-2026-114938.
The updated tags include
latest,26.8,26.8.2, and26.8.2-3.If you are not using the container images or building your own check if your OpenJDK vendor has released updates. Fixed
versions include 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1. Older releases of OpenJDK 17, 21, and 25 are affected.
As of publishing Oracle and Red Hat have released updates. Eclipse Temurin
for Linux have been released, while other platforms are in-progress.
tilalx commentedon Nov 19, 2026
quay.io/keycloak/keycloak:26.8.2-3 ships java-21-openjdk-headless-21.0.13.1.2-1.2.el9. That's the exact RHEL 9 package from RHSA-2026:100567 (https://access.redhat.com/errata/RHSA-2026:100567), which fixes CVE-2026-114938.