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=2or a lower AVX level, which prevents the use of AVX-512 instructions. -
The JVM has not been started with
-XX:-UseBASE64Intrinsicswhich 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.
|
The following Cloudbees infrastructure services are not affected by this vulnerability: |
Resolution
The Cloudbees security advisory for this is https://www.cloudbees.com/security-advisories/cloudbees-security-advisory-2026-11-18.
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, upgrade to 2.580.2.38436.
For agents:
-
Ensure the Java runtime is updated to a fixed version.
-
Kubernetes agents
-
The
cloudbees/cloudbees-core-agent:2.580.2.38436image sets workaround JVM option in the default agent image. -
Pod templates that use a custom agent image, and other containers in the pod that run Java, still require a Java runtime update with the fixed version, or the appropriate JVM workaround option from Kubernetes agents.
-
-
Agents that are not Kubernetes pods
-
Ensure the Java runtime is updated to a fixed version, or start the JVM with the appropriate workaround option from Agents that are not Kubernetes pods.
-
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 |
For details on how to set Java arguments, see:
Cloudbees CI on modern cloud platforms
-
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.RetrieverandMcpRouterentries 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. -
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. -
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.
Releases of Cloudbees CI that fix this vulnerability set the option in the default agent image. Pod templates that use their own agent image, and other containers in the pod that run Java, still need the environment variable.
Agents that are not Kubernetes pods
Cloudbees CI does not supply the JVM that runs these agents, so a Cloudbees CI update does not change them. Agent JVMs do not usually accept network connections, which limits exposure, but they still run the vulnerable code if they use an affected JDK. Update the JDK on these agents to a fixed version from your Java vendor. Until then, apply the workaround for the launcher that starts the agent:
| Launcher | Where to add -XX:-UseBASE64Intrinsics |
|---|---|
SSH Build Agents ( |
JVM Options field of the agent, or Prefix Start Agent Command set to |
Cloudbees SSH Build Agents ( |
JVM Options field of the agent |
Amazon EC2 ( |
JVM Options field of the AMI template |
Google Compute Engine ( |
The plugin has no JVM options field.
Set Java Path to |
Command launcher ( |
The |
Inbound agents started outside Kubernetes |
The |
Alternatively, set JDK_JAVA_OPTIONS=-XX:-UseBASE64Intrinsics in the system-wide environment of the agent machine or image.
This covers every launcher above.
| 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.
|