---
title: "Java4Shell: Java and Keycloak mitigation for CVE-2026-114938 | CloudGuys Blog"
description: "Check Java4Shell exposure in Java and Keycloak, disable vulnerable Base64 intrinsics, verify running JVMs, and plan the permanent runtime update."
url: "https://cloudguys.io/blog/java4shell-java-keycloak-cve-2026-114938"
language: "en"
image: "https://cloudguys.io/_astro/cover.BPNbQRp9.jpg"
published: "2026-11-18T00:00:00.000Z"
modified: "2026-11-19T00:00:00.000Z"
---

ENGINEERING NOTES / SECURITY

# Java4Shell: how to check and protect Java and Keycloak deployments

A practical response to CVE-2026-114938: check the Java runtime and CPU, mitigate Keycloak, verify live JVM flags, and deploy a vendor-confirmed fix.

Sabbir Ahmed · · · November 18, 2026 · · · 6 min · · · Facts checked November 19, 2026

![Java4Shell: how to check and protect Java and Keycloak deployments](https://cloudguys.io/_astro/cover.BPNbQRp9_fl4Pd.webp)

If you operate Keycloak, check the Java runtime underneath it today. In its [18 November 2026 advisory](https://www.keycloak.org/2026/11/java4shell-vulnerability-cve-2026-114938), the Keycloak team reports that researchers demonstrated remote code execution before authentication through Java4Shell, **CVE-2026-114938**. A login screen therefore does not establish that an instance is protected.

## What changed on 19 November

**Keycloak has shipped a patched server image.** At 08:00 UTC on 19 November, the project confirmed that `26.8.2-3` includes Red Hat OpenJDK `21.0.13.1`, which fixes CVE-2026-114938. Keycloak also refreshed the `26.8.2`, `26.8`, and `latest` tags. The earlier x86-64 images `26.8.2-1` and `26.8.2-2` bundled an affected build. [Keycloak advisory](https://www.keycloak.org/2026/11/java4shell-vulnerability-cve-2026-114938).

If your deployment already specifies `26.8.2`, a running pod can still be serving the older image. Pull the patched server image, record its digest, and roll it out to every replica. Check the image digest and Java build on each replacement. If you also run the Keycloak Operator, verify its own runtime separately. Keep the temporary mitigation on affected processes until you can verify their replacement.

For teams that package their own Java services, Eclipse Adoptium lists the following fixed **Temurin** builds. Check availability for your platform and image in the [release tracker](https://github.com/adoptium/temurin/issues/326). [Adoptium security guidance](https://adoptium.net/news/2026/11/temurin-november-2026-cspu-java4shell/).

| Java release | Fixed Temurin build |
| --- | --- |
| 17 | `17.0.21.1+2` |
| 21 | `21.0.13.1+2` |
| 25 | `25.0.5.1+2` |
| 27 | `27.0.1.1+4` |

**Spring Boot with Reactor Netty:** Calif reported remote code execution in a sample Spring Boot application. That finding establishes exposure for the sample. For your own WebFlux service, check the deployed JVM, CPU and whether untrusted input reaches the affected JDK decoder. The choice of Netty alone cannot settle that assessment. [Calif disclosure](https://calif.io/java4shell/) and [Red Hat exposure conditions](https://access.redhat.com/security/vulnerabilities/RHSB-2026-018).

## What Java4Shell affects

The flaw is in OpenJDK’s accelerated `java.util.Base64.Decoder`. Malformed input can corrupt memory when the JVM uses the affected x86-64 implementation. Depending on the application path, the result can include a process crash or remote code execution. [Red Hat’s security bulletin](https://access.redhat.com/security/vulnerabilities/RHSB-2026-018) identifies the following exposure conditions:

| Check | Condition to investigate |
| --- | --- |
| Runtime | An unpatched OpenJDK build from 17.0.6 onward, including affected 21 and 25 builds |
| CPU | x86-64 with AVX-512 VBMI exposed to the JVM |
| JVM configuration | The accelerated Base64 path remains enabled |
| Application input | Attacker-controlled Base64 reaches the standard decoder |

Red Hat says OpenJDK 8 and 11 lack this vulnerable path, and ARM64 or x86-64 systems without AVX-512 VBMI are not known to be affected. Treat that as scope for this CVE, not a reason to stop normal security updates.

Because this lives in the runtime, add bundled JVMs and container images to the investigation. Updating an application dependency cannot establish that the Java process has been fixed.

## Build an inventory of actual deployments

Our recommended incident worksheet has one row per deployment, with the runtime vendor and full build, image digest, node or VM, CPU feature result, effective mitigation flag, owner, and patch evidence. Separate production, staging, background workers, and disaster recovery instances.

For a Linux host, check for the relevant CPU feature:

```sh
grep -m1 '^flags' /proc/cpuinfo | grep -w avx512vbmi
```

Run this on the host or VM executing the workload. In Kubernetes, identify its current node first:

```sh
kubectl -n identity get pods -o wide
```

Check every node eligible to receive the workload. Otherwise, a reschedule can invalidate your assessment. Record missing or inaccessible evidence as **unknown**, then investigate it; an unsuccessful check is not proof of safety.

For containerized Keycloak, inspect the bundled Java build:

```sh
kubectl -n identity exec example-kc-0 -c keycloak -- java -version
```

Replace the example namespace and pod name with yours. This starts a new Java process: it identifies the runtime in that container but does not prove which options the existing server received. For host installations, check the Java executable selected by the service configuration, which may differ from your shell’s default.

## Apply the temporary JVM mitigation

Red Hat recommends `-XX:-UseBASE64Intrinsics` as the preferred interim measure. It disables the affected Base64 acceleration while retaining other AVX-512 optimizations. Its alternative, `-XX:UseAVX=2`, disables AVX-512 more broadly and must not be applied to ARM64 JVMs, where the option can prevent startup. These are temporary measures pending a patched runtime. [Source: Red Hat mitigation guidance](https://access.redhat.com/security/vulnerabilities/RHSB-2026-018).

For Keycloak started from its distribution directory in a shell:

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

Retain your normal startup arguments. For systemd, configure the service environment and restart the service; a shell export will not change it. Containers must be recreated or rolled out with the updated environment. Preserve existing JVM options. [Source: Keycloak’s mitigation instructions](https://www.keycloak.org/2026/11/java4shell-vulnerability-cve-2026-114938).

For an Operator-managed server, the [Keycloak advanced configuration guide](https://www.keycloak.org/operator/advanced-configuration) supports custom environment variables through `spec.env`. Merge this fragment into the existing `Keycloak` resource, appending to any existing `JAVA_OPTS_APPEND` value:

```yaml
spec:
  env:
    - name: JAVA_OPTS_APPEND
      value: "-XX:-UseBASE64Intrinsics"
```

Keep its database, TLS, hostname, and other settings. Check that reconciliation replaces every server pod. Make the change in the configuration source your deployment process owns so the next release retains it.

The Operator has a separate JVM. Keycloak’s advisory specifies `JDK_JAVA_OPTIONS` for that process; the server’s `JAVA_OPTS_APPEND` does not configure it. Assess and update both, preserving existing options and using the OLM Subscription configuration where applicable. [Source: Keycloak Operator guidance](https://www.keycloak.org/2026/11/java4shell-vulnerability-cve-2026-114938).

## Verify the running JVM

Use `jcmd` against the live process. Oracle documents `VM.flags -all` for inspecting JVM flags; run the tool in the target environment with the same effective user and group as the application. [Source: Oracle’s jcmd reference](https://docs.oracle.com/en/java/javase/25/docs/specs/man/jcmd.html).

List processes inside the Keycloak container:

```sh
kubectl -n identity exec example-kc-0 -c keycloak -- jcmd -l
```

Then substitute the actual Keycloak PID:

```sh
kubectl -n identity exec example-kc-0 -c keycloak -- \
  jcmd <keycloak-pid> VM.flags -all | grep -F UseBASE64Intrinsics
```

Confirm that `UseBASE64Intrinsics` is `false` on every restarted JVM. A variable visible in a manifest is insufficient evidence. [Source: Keycloak verification guidance](https://www.keycloak.org/2026/11/java4shell-vulnerability-cve-2026-114938).

Save the result alongside each pod’s image digest and restart time. If attach tooling is unavailable, record the verification gap and arrange a supported diagnostic method before closing the task. Do not run an exploit against production as a health check.

## Deploy and prove the permanent fix

[Oracle’s November 2026 security advisory](https://www.oracle.com/security-alerts/cspunov2026.html) includes CVE-2026-114938. Use your runtime or product vendor’s release notice to identify the fixed build for your distribution; an Oracle version string is not a universal minimum across vendors and backports.

For custom images, rebuild with the fixed Java package or base image, publish a new digest, and replace the running workloads. Updating Java on a Kubernetes node does not update a JVM packaged inside a container. For vendor products, follow their supported update path.

Our recommended completion evidence is:

-   A vendor statement covering the CVE and the exact runtime build you deployed.
-   Runtime and image evidence from every replacement instance, including standby capacity.
-   Successful login, token refresh, and the federation flows your deployment uses.
-   A rollback image that also carries the fix or the verified mitigation.

Keep the workaround until the fixed deployment is verified, then remove it in a controlled rollout. Continue following the [Keycloak advisory](https://www.keycloak.org/2026/11/java4shell-vulnerability-cve-2026-114938) for updated image guidance.

If your team needs help mapping Java runtimes across hosts and Kubernetes workloads, CloudGuys can help with [security readiness](https://cloudguys.io/services/security-readiness). Bring the runtime inventory and rollout evidence so the review starts with the systems actually running.

#Java · #Keycloak · #OpenJDK · #Security · #Kubernetes

Share this article

-   [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcloudguys.io%2Fblog%2Fjava4shell-java-keycloak-cve-2026-114938%3Futm_source%3Dlinkedin%26utm_medium%3Dsocial "Share on LinkedIn")
-   [X](https://twitter.com/intent/tweet?text=Java4Shell%3A%20how%20to%20check%20and%20protect%20Java%20and%20Keycloak%20deployments&url=https%3A%2F%2Fcloudguys.io%2Fblog%2Fjava4shell-java-keycloak-cve-2026-114938%3Futm_source%3Dx%26utm_medium%3Dsocial "Share on X")
-   [Reddit](https://www.reddit.com/submit?url=https%3A%2F%2Fcloudguys.io%2Fblog%2Fjava4shell-java-keycloak-cve-2026-114938%3Futm_source%3Dreddit%26utm_medium%3Dsocial&title=Java4Shell%3A%20how%20to%20check%20and%20protect%20Java%20and%20Keycloak%20deployments "Share on Reddit")
-   [Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fcloudguys.io%2Fblog%2Fjava4shell-java-keycloak-cve-2026-114938%3Futm_source%3Dhackernews%26utm_medium%3Dsocial&t=Java4Shell%3A%20how%20to%20check%20and%20protect%20Java%20and%20Keycloak%20deployments "Share on Hacker News")
-   [Email](mailto:?subject=Java4Shell%3A%20how%20to%20check%20and%20protect%20Java%20and%20Keycloak%20deployments&body=Java4Shell%3A%20how%20to%20check%20and%20protect%20Java%20and%20Keycloak%20deployments%0A%0Ahttps%3A%2F%2Fcloudguys.io%2Fblog%2Fjava4shell-java-keycloak-cve-2026-114938%3Futm_source%3Demail%26utm_medium%3Dsocial "Share on Email")

A FRESH PERSPECTIVE ON YOUR CLOUD

## Great engineering starts  
with a good conversation.

Let’s talk about what’s working, what’s slowing you down, and what comes next.

[Talk to an engineer ↗](mailto:hello@cloudguys.io?subject=CloudGuys%20assessment%20enquiry)

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "@type": [
      "ProfessionalService",
      "Organization"
    ],
    "@id": "https://cloudguys.io/#organization",
    "name": "CloudGuys",
    "url": "https://cloudguys.io/",
    "logo": {
      "@type": "ImageObject",
      "url": "https://cloudguys.io/assets/logo.png",
      "width": 512,
      "height": 512
    },
    "image": "https://cloudguys.io/assets/og-image.png",
    "description": "Self-hosted software products, senior engineers embedded in client teams, and cloud security and architecture advisory across AWS, Google Cloud, Azure, Kubernetes, and infrastructure as code.",
    "email": "hello@cloudguys.io",
    "founder": {
      "@type": "Person",
      "@id": "https://cloudguys.io/authors/sabbir-ahmed#person",
      "name": "Sabbir Ahmed",
      "url": "https://cloudguys.io/authors/sabbir-ahmed"
    },
    "slogan": "Ship with confidence. Keep control.",
    "areaServed": "Worldwide",
    "hasOfferCatalog": {
      "@type": "OfferCatalog",
      "name": "CloudGuys engagements",
      "itemListElement": [
        {
          "@type": "Offer",
          "itemOffered": {
            "@type": "Service",
            "name": "Embedded engineers",
            "url": "https://cloudguys.io/services/embedded-engineers",
            "provider": {
              "@id": "https://cloudguys.io/#organization"
            }
          }
        },
        {
          "@type": "Offer",
          "itemOffered": {
            "@type": "Service",
            "name": "Cloud security assessment",
            "url": "https://cloudguys.io/services/cloud-security-assessment",
            "provider": {
              "@id": "https://cloudguys.io/#organization"
            }
          }
        },
        {
          "@type": "Offer",
          "itemOffered": {
            "@type": "Service",
            "name": "Cloud architecture review",
            "url": "https://cloudguys.io/services/cloud-architecture-review",
            "provider": {
              "@id": "https://cloudguys.io/#organization"
            }
          }
        },
        {
          "@type": "Offer",
          "itemOffered": {
            "@type": "Service",
            "name": "Security remediation",
            "url": "https://cloudguys.io/services/security-remediation",
            "provider": {
              "@id": "https://cloudguys.io/#organization"
            }
          }
        }
      ]
    },
    "knowsAbout": [
      "DevOps",
      "Kubernetes",
      "Terraform",
      "Cloud migration",
      "Cloud cost optimization",
      "GitOps",
      "Site reliability engineering",
      "Kubernetes dashboard",
      "AI SRE",
      "Kubernetes troubleshooting",
      "AWS",
      "Google Cloud",
      "Azure"
    ],
    "contactPoint": {
      "@type": "ContactPoint",
      "contactType": "sales",
      "email": "hello@cloudguys.io",
      "availableLanguage": [
        "English"
      ],
      "areaServed": "Worldwide"
    },
    "sameAs": [
      "https://www.linkedin.com/company/agrohitech",
      "https://berth.cloudguys.io",
      "https://tele.cloudguys.io"
    ],
    "owns": [
      {
        "@type": "SoftwareApplication",
        "@id": "https://berth.cloudguys.io/#software",
        "name": "Berth",
        "applicationCategory": "DeveloperApplication",
        "operatingSystem": "Kubernetes",
        "url": "https://berth.cloudguys.io",
        "description": "Berth is a self-hosted Kubernetes dashboard with a read-only AI SRE: endpoint health, capacity planning, guided app exposure, and evidence-based troubleshooting, run in your own cluster."
      },
      {
        "@type": "SoftwareApplication",
        "@id": "https://tele.cloudguys.io/#software",
        "name": "Tele",
        "applicationCategory": "CommunicationApplication",
        "operatingSystem": "Web",
        "url": "https://tele.cloudguys.io",
        "description": "Tele is real-time audio and video call infrastructure: a meeting API for embedding calls in your own application and a managed workspace for teams, deployable in your own cloud or private environment."
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "@type": "WebSite",
    "@id": "https://cloudguys.io/#website",
    "url": "https://cloudguys.io/",
    "name": "CloudGuys",
    "description": "Self-hosted software, embedded engineers and cloud security advisory for teams that run their own platform.",
    "publisher": {
      "@id": "https://cloudguys.io/#organization"
    },
    "inLanguage": "en"
  },
  {
    "@context": "https://schema.org",
    "@type": "BlogPosting",
    "@id": "https://cloudguys.io/blog/java4shell-java-keycloak-cve-2026-114938#article",
    "headline": "Java4Shell: how to check and protect Java and Keycloak deployments",
    "description": "Check Java4Shell exposure in Java and Keycloak, disable vulnerable Base64 intrinsics, verify running JVMs, and plan the permanent runtime update.",
    "image": "https://cloudguys.io/_astro/cover.BPNbQRp9.jpg",
    "datePublished": "2026-11-18T00:00:00.000Z",
    "dateModified": "2026-11-19T00:00:00.000Z",
    "author": {
      "@type": "Person",
      "@id": "https://cloudguys.io/authors/sabbir-ahmed#person",
      "name": "Sabbir Ahmed",
      "jobTitle": "Founder",
      "url": "https://cloudguys.io/authors/sabbir-ahmed",
      "worksFor": {
        "@id": "https://cloudguys.io/#organization"
      },
      "sameAs": [
        "https://github.com/by-sabbir"
      ]
    },
    "publisher": {
      "@id": "https://cloudguys.io/#organization"
    },
    "mainEntityOfPage": {
      "@type": "WebPage",
      "@id": "https://cloudguys.io/blog/java4shell-java-keycloak-cve-2026-114938"
    },
    "articleSection": "Security",
    "keywords": "Java, Keycloak, OpenJDK, Security, Kubernetes",
    "inLanguage": "en"
  },
  {
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://cloudguys.io/"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Blog",
        "item": "https://cloudguys.io/blog"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "Java4Shell: how to check and protect Java and Keycloak deployments",
        "item": "https://cloudguys.io/blog/java4shell-java-keycloak-cve-2026-114938"
      }
    ]
  }
]
```
