Java4Shell workarounds for CVE-2026-114938 CloudBees CI

Last Reviewed:2026-11-18()
3 minute readKnowledge base

Issue

A memory corruption vulnerability in OpenJDK 17.0.6 and later, known as Java4Shell, allows an unauthenticated remote attacker to achieve arbitrary code execution on x86-64 systems whose CPU supports the AVX-512 VBMI instruction set.

The vulnerability is described at:

All of the following conditions must be present for the vulnerability to be exploitable:

  • The application runs on a non-patched OpenJDK 17.0.6 or later (including OpenJDK 21 and 25).

  • The host CPU is x86-64 and supports the AVX-512 VBMI instruction set (Intel Ice Lake, Sapphire Rapids, Emerald Rapids, Granite Rapids; AMD Zen 4, Zen 5, Zen 6).

  • The JVM has not been started with -XX:UseAVX=2 or a lower AVX level, which prevents the use of AVX-512 instructions.

  • The JVM has not been started with -XX:-UseBASE64Intrinsics which prevents the use of the affected code

  • The application passes attacker-controlled Base64-encoded data to the Java standard library decoder (java.util.Base64.Decoder). Common sources include HTTP Basic credentials, SAML artifacts, CSRF tokens, and MIME encoded words, all of which are frequently decoded before authentication completes.

Environment

Per the OpenJDK Vulnerability Advisory 2026/11/17, the affected OpenJDK versions are 27.0.1.0.3, 25.0.5.0.3, 21.0.13.0.3, 17.0.21.0.3, and earlier. The specific affected version in your environment might depend on your JDK vendor, for example Oracle, Red Hat, or Azul Systems.

Resolution

On CloudBees CI on traditional platforms deployments without containers, follow your Java vendor’s advisory to update Java to the fixed version.

On CloudBees CI on modern cloud platforms deployments, and on CloudBees CI on traditional platforms deployments running in containers, use the startup argument mitigation described in the Workaround section while CloudBees builds the images for the next release.

Workaround

Mitigate Java4Shell by starting OpenJDK with either of the following arguments:

-XX:-UseBASE64Intrinsics

Disables hardware-accelerated Base64 encoding and decoding. This is the argument used in the steps below.

-XX:UseAVX=2

Disables AVX-512.

Apply -XX:UseAVX=2 only on x86-64 hosts. OpenJDK on ARM does not recognize it and fails to start.

For details on how to set Java arguments, see:

CloudBees CI on modern cloud platforms

  1. Set the Java option for the operations center and the managed controllers in your Helm values file. If you run the CasC retriever or the MCP router, set the option for them as well:

    OperationsCenter: JavaOpts: "-XX:-UseBASE64Intrinsics" CasC: Retriever: extraJvmArgs: "-XX:-UseBASE64Intrinsics" Master: JavaOpts: "-XX:-UseBASE64Intrinsics" McpRouter: javaOpts: "-XX:-UseBASE64Intrinsics"
    ▼

    Omit the CasC.Retriever and McpRouter entries if you don’t run those services. If you already set Java options for any of these components, append the flag rather than replacing them.

  2. Apply the values:

    helm upgrade cloudbees-core cloudbees/cloudbees-core --namespace mynamespace --values values.yaml --version <current chart version>
    ▼

    Replace cloudbees-core, mynamespace, values.yaml, and <current chart version> with your release name, namespace, values file, and currently deployed helm chart version.

  3. Restart each running managed controller from the operations center.

    The operations center, the CasC retriever, and the MCP router pick up the new option when you run helm upgrade, with no manual restart needed. Each running managed controller only picks it up after it restarts.

Kubernetes agents

The Helm chart has no setting for agents. Add the environment variable JDK_JAVA_OPTIONS with the value -XX:-UseBASE64Intrinsics to each pod template, for example in envVars in a Pipeline podTemplate, or in the environment variables of the pod template in the Kubernetes cloud configuration:

podTemplate(envVars: [envVar(key: 'JDK_JAVA_OPTIONS', value: '-XX:-UseBASE64Intrinsics')]) { node(POD_LABEL) { // build steps } }
▼

The change applies to agents started after it. Agents that are already running keep running without it.

Agents that are not Kubernetes pods

For SSH, inbound, or cloud agents such as EC2 and Google Compute Engine, check the configuration of the agent itself and do one of the following:

  • Add -XX:-UseBASE64Intrinsics to the JVM options of the java command that starts the agent, for example in the JVM Options field of an SSH agent or of an EC2 template.

  • Set JDK_JAVA_OPTIONS=-XX:-UseBASE64Intrinsics in the system-wide environment of the agent machine or image.

  • For SSH agents the Prefix Start Agent Command (export JDK_JAVA_OPTIONS=-XX:-UseBASE64Intrinsics;) can also be used.

An environment variable set only on the controller, or on the container that started the SSH connection, does not reach an SSH agent.
JDK_JAVA_OPTIONS applies to every java process started in that environment, including build tools, test runs, and any other JVM. The JVM Options field of an SSH or EC2 agent affects only the agent JVM.

CloudBees CI on traditional platforms running in containers

the following has been validated using OpenJDK. Please validate with your vendor if you need a different fix. Set -XX:-UseBASE64Intrinsics as a Java argument for the operations center and the controllers, following How to add Java arguments to CloudBees CI?, and restart them.
This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.