Ce mail provient de l'extérieur, restons vigilants

=====================================================================


                            CERT-Renater

                Note d'Information No. 2026/VULN1152
_____________________________________________________________________

DATE                : 18/11/2026

HARDWARE PLATFORM(S): /

OPERATING SYSTEM(S): Systems running Keycloak.

====================================================================
https://www.keycloak.org/2026/11/java4shell-vulnerability-cve-2026-114938
_____________________________________________________________________

Java4Shell: What Keycloak admins need to do (CVE-2026-114938)

November 18 2026 by The Keycloak team

Last updated: 18 November 2026, 09:29 UTC

If your organization uses Keycloak, please pass this post to the team
that operates it, even if you do not run Keycloak yourself. They need
to check the Java runtime and the CPU type used by every Keycloak
instance. The issue is CVE-2026-114938, known as Java4Shell.

The flaw is in OpenJDK’s accelerated Base64 decoder, which Keycloak
uses to process some requests. On affected systems, a malformed value
that Keycloak decodes before authentication can corrupt the Java
process’s memory. The researchers report that they demonstrated
pre-authentication remote code execution against Keycloak.


Am I affected?

Treat a Keycloak instance as at risk when all of these apply:

    It runs an unpatched OpenJDK build from 17.0.6 onward, including
unpatched OpenJDK 21 and 25 builds.

    Its x86-64 host or virtual machine exposes the avx512vbmi CPU
feature to Java.

    The running JVM has Base64 intrinsics enabled and has not been
limited to AVX2 with -XX:UseAVX=2.

As checked on 18 November 2026, the x86-64 Keycloak container images
tagged 26.8.2-1 and 26.8.2-2 bundle an affected OpenJDK 21.0.13 build.
These image tags alone do not establish whether your deployment is
exploitable: check the CPU feature and effective JVM flags as
described below. A Keycloak ZIP or TAR.GZ distribution started
directly on a host can also be affected; the conditions depend
on its Java runtime and CPU, not on whether it runs in a
container.

Keycloak processes Base64 data on requests that arrive before
authentication, so administrators should not assume that a login
requirement protects an affected instance. Check every node or
virtual machine that can run Keycloak, including failover nodes
and nodes used during rolling updates. A check on your workstation
does not establish the status of a production deployment.

On the Keycloak host or virtual machine, check the CPU feature:

grep -m1 '^flags' /proc/cpuinfo | grep -qw avx512vbmi && echo 'AVX-512 VBMI available'

If this prints nothing, that CPU does not expose AVX-512 VBMI and
is not known to be affected by this flaw. On a container platform,
run the check on the node that executes the Keycloak container.

Check the Java version that the deployment actually uses. For a ZIP or
TAR.GZ installation, run java -version with the Java executable used
to start Keycloak; a system service may use a different Java
installation from your interactive shell. For a container image,
check its bundled runtime:

docker exec <keycloak-container> java -version
# Or, on Kubernetes:
kubectl exec <keycloak-pod> -c keycloak -- java -version

These commands identify the bundled runtime; they start a separate
Java process and do not tell you which flags the running Keycloak
JVM uses. Check the live JVM flags in the verification section below.


How do I protect Keycloak now?

Start each affected Keycloak JVM with -XX:-UseBASE64Intrinsics and
restart every instance. This is Red Hat’s preferred interim mitigation.
It disables the vulnerable accelerated Base64 path while retaining
other AVX-512 optimizations. If you already set JAVA_OPTS_APPEND, 
the flag to the existing value rather than replacing your other JVM
options.

For a ZIP or TAR.GZ installation started from its distribution
directory in a shell, use:

export JAVA_OPTS_APPEND="${JAVA_OPTS_APPEND:+$JAVA_OPTS_APPEND }-XX:-UseBASE64Intrinsics"
./bin/kc.sh start

Keep the other options from your normal start command. If a service
manager such as systemd starts Keycloak, set JAVA_OPTS_APPEND in that
service’s environment instead and restart the service; exporting it
in an interactive shell does not change an already running service.

For a Keycloak container started with Docker or Podman, add this
environment variable to the existing run command:

-e JAVA_OPTS_APPEND=-XX:-UseBASE64Intrinsics

For Docker Compose, add it to the Keycloak service:

environment:
  JAVA_OPTS_APPEND: "-XX:-UseBASE64Intrinsics"

For a Keycloak Operator deployment that uses a pod template, add the
variable to the keycloak container in the existing Keycloak custom
resource:

apiVersion: k8s.keycloak.org/v2beta1
kind: Keycloak
metadata:
  name: example-kc
spec:
  unsupported:
    podTemplate:
      spec:
        containers:
          - name: keycloak
            env:
              - name: JAVA_OPTS_APPEND
                value: "-XX:-UseBASE64Intrinsics"

Merge the example into your existing resource, preserving its database,
TLS, and other settings. This changes the Keycloak custom resource,
not the Operator installation or image. The Operator also supports 
.env for this variable if you do not already use a pod template. Make
sure the Operator replaces or restarts every Keycloak pod so that each
JVM receives the new flag.


How do I verify the mitigation?

Ask the running Keycloak JVM for its effective flag value with jcmd.
The official Keycloak 26.8.2 container includes jcmd. For an
Operator-managed pod named example-kc-0, run:

kubectl exec example-kc-0 -c keycloak -- jcmd io.quarkus.bootstrap.runner.QuarkusEntryPoint VM.flags -all | grep -F UseBASE64Intrinsics

The expected output is:

bool UseBASE64Intrinsics = false {product} {command line}

The whitespace between fields may differ.

For a ZIP or TAR.GZ installation running directly on a host,
run jcmd -l on that host to find the Keycloak process ID,
then query that process:

jcmd -l
jcmd <keycloak-pid> VM.flags -all | grep -F UseBASE64Intrinsics

For Docker or Podman, replace the kubectl exec … -- part with
docker exec <keycloak-container> or podman exec <keycloak-container>.
If jcmd cannot find the process by its main class, run jcmd -l in
the container and use the listed Keycloak PID. Repeat the check for
every Keycloak process after restart or rollout, including every
pod or container. Seeing the variable in a service or container’s
environment is not enough; the live JVM must report
UseBASE64Intrinsics = false.


What about the Keycloak Operator itself?

The Keycloak Operator runs in a separate Java process. The 26.8.2
Operator image is built with OpenJDK 25, so its JVM can also have
the vulnerable Base64 decoder when it runs an unpatched build on a
host with AVX-512 VBMI. Unlike the Keycloak server, the Operator
usually has no unauthenticated remote request path that passes
attacker-controlled Base64 to this decoder. It normally receives
configuration and Secrets through the authenticated Kubernetes API;
we have not established an unauthenticated remote exploit path
into the Operator itself.

To mitigate its JVM, set JDK_JAVA_OPTIONS on the Operator
Deployment and restart its pods:

kubectl -n <operator-namespace> set env deployment/keycloak-operator JDK_JAVA_OPTIONS=-XX:-UseBASE64Intrinsics

If Operator Lifecycle Manager (OLM) manages the Operator, set the
variable in the Subscription’s spec.config.env so it is retained
when OLM manages the Deployment:

spec:
  config:
    env:
      - name: JDK_JAVA_OPTIONS
        value: "-XX:-UseBASE64Intrinsics"

Preserve any existing JDK_JAVA_OPTIONS value by adding the flag to
it. The Operator image starts java directly, so JAVA_OPTS_APPEND
used by the Keycloak server startup script does not configure the
Operator. After the Operator pod restarts, check its running JVM:

kubectl -n <operator-namespace> exec deployment/keycloak-operator -- jcmd 1 VM.flags -all | grep -F UseBASE64Intrinsics

The result must report UseBASE64Intrinsics = false. Configuring
the Operator does not configure the Keycloak pods that it manages;
apply the Keycloak custom resource mitigation above as well.


What about a permanent fix?

Install a Keycloak image or Java runtime whose vendor confirms that
it fixes CVE-2026-114938, then redeploy and verify every instance.
For custom images, rebuild them with the fixed Java base image or
package. At the time of writing, we cannot recommend a specific
fixed Keycloak image. We will release updated Keycloak and
Keycloak Operator container images as soon as patched OpenJDK
builds are available for them. We will update this post with the
new image tags and verification details when those rebuilt images
are ready. Do not use the Keycloak version number alone to
determine whether a deployment is fixed: images can bundle
different Java runtimes, and vendors can backport security fixes.

Follow the Red Hat security bulletin and Keycloak tracking issue
for updates. Keep the mitigation in place until you have deployed
and verified a vendor-confirmed fixed runtime.


=========================================================
+ CERT-RENATER        |    tel : 01-53-94-20-44         +
+ 23/25 Rue Daviel    |    fax : 01-53-94-20-41         +
+ 75013 Paris         |   email:cert@support.renater.fr +
=========================================================




