Published on: November 20, 2026

8 min read

Java4Shell: GitLab helps find and remediate a critical Java flaw

CVE-2026-114938 allows unauthenticated remote code execution in Java. Learn which builds fix the flaw and how to check your projects.

GitLab has internally assessed the impact of Java4Shell, and concluded it is not exploitable in GitLab-managed infrastructure. Exploitation requires a specific combination of conditions, which we confirmed are not present in our production environment. A single component was found to contain the impacted bundle in its runtime environment, which we are proactively upgrading as a hardening measure.

On November 17, 2026, OpenJDK, the project that most Java runtimes are built from, fixed a memory corruption flaw known as Java4Shell (CVE-2026-114938, CVSS 8.1) in the optimized java.util.Base64 decoding used on recent x86-64 CPUs. Web servers and frameworks routinely decode Base64 values from users, such as authentication headers and cookies, before the application sees the request. Researchers have demonstrated unauthenticated remote code execution in the default configurations of several widely used Java products.

Upgrade Java to a fixed version now

To mitigate this issue, upgrade every Java runtime from 17.0.6 onward, including unsupported releases such as Java 18 and 24, to a build based on OpenJDK 17.0.21.1, 21.0.13.1, 25.0.5.1, or 27.0.1.1, or to your distribution’s patched package. If you can’t upgrade right away, turn off the vulnerable optimization with the -XX:-UseBASE64Intrinsics JVM option.

Here are fixed builds and packages as of November 19:

Vendor or distributionFixed build or package
OpenJDK17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1
Eclipse Temurin17.0.21.1+2, 21.0.13.1+2, 25.0.5.1+2, 27.0.1.1+4
Amazon Corretto17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2, 27.0.1.1.4
Azul Zulu17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1
BellSoft Liberica17.0.21.1+5, 21.0.13.1+5, 25.0.5.1+5, 27.0.1.1+5
SapMachine17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1
Microsoft Build of OpenJDK17.0.21.1, 21.0.13.1, 25.0.5.1
Oracle Java SE 8 Performance Pack8u513-perf. Other Java 8 builds aren’t affected
Ubuntu 26.10, 26.04, 24.04, 22.04openjdk-17 17.0.21.1, openjdk-21 21.0.13.1, openjdk-25 25.0.5.1, and on 26.10 openjdk-27 27.0.1.1
Ubuntu 20.04 and 18.04 (ESM)openjdk-17 17.0.21.1, and on 20.04 openjdk-21 21.0.13.1
Debian 13 and 12Fixed only in unstable for now
Alpine 3.24 and 3.23openjdk17 17.0.21.1, openjdk21 21.0.13.1, openjdk25 25.0.5.1
Alpine 3.22No fix, as its openjdk packages are no longer supported
Amazon Linux 2023The Corretto versions above, as java-17, java-21, java-25, and java-27-amazon-corretto
RHEL 10, 9, and 8No fix yet

Sources: the OpenJDK advisory, vendors’ release pages, and the Ubuntu, Debian, Alpine, and Red Hat security trackers, as of November 19, 2026.

How you apply the upgrade depends on where Java runs:

  1. Containers with a floating tag, such as amazoncorretto:21: Rebuild the image so it pulls the latest base image, then redeploy.
  2. Containers with a pinned tag: Change the tag to a fixed version, then redeploy.
  3. Hosts: Upgrade the package, then restart every Java process.

For containers, check that the new base image ships a fixed version. As of November 19, eclipse-temurin:21 and the images built on it, such as tomcat, still don't, so they need the workaround below until they do.

If you can’t upgrade yet, turn off the vulnerable optimization

Set the -XX:-UseBASE64Intrinsics JVM option, and restart every Java process for it to take effect. Base64 decoding will then use the regular version, which doesn’t have the flaw, and is only slightly slower.

To apply it to every JVM a container starts, add it to the JAVA_TOOL_OPTIONS environment variable, keeping any value already set. In a shell script, such as the container’s entrypoint, add this line of code:

      export JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS:+$JAVA_TOOL_OPTIONS }-XX:-UseBASE64Intrinsics"

    

To confirm the option is set, run java -XX:+PrintFlagsFinal -version | grep UseBASE64Intrinsics in the container, which should print false.

Locate Java projects across your GitLab groups

Any project that runs Java needs a fixed version, including the ones that are easy to forget, such as a CI tool, a build server, or a product that bundles its own JDK. Finding them takes two views: a static search of what your repositories declare and your images contain, and a runtime inventory of what actually runs. GitLab covers the static view with three features: container scanning, GitLab Orbit, and a language filter. Use them in this order.

1. Container scanning

Container scanning reports vulnerabilities in operating system packages, so it finds Java installed with apt, apk, or dnf. It reports the CVE once the CVE reaches the advisories in the scanner’s vulnerability database. To turn it on for a project, add the template to .gitlab-ci.yml:

      include:  
  - template: Security/Container-Scanning.gitlab-ci.yml  
   
container_scanning:  
  variables:  
    # Experimental, Ultimate only: also reports runtimes not installed by a package manager  
    CS_BINARY_SCAN: "true"

    

You can also use a group-level scan execution policy to turn container scanning on for every project in a group at once. Once the policy is on, the next pipeline in each project runs container scanning. After the scan completes, review the default branch’s results in the Vulnerability Report.

You can also set up merge request approval policies with container scanning. If a code change contains Java4Shell, the policy blocks the merge until the selected approvers approve it.

In addition, turn on CS_BINARY_SCAN to find Java runtimes that no package manager installed, such as the JDK archive the eclipse-temurin images unpack or a JDK bundled in an application. The default scan can’t see them because they have no package record. The binary scan identifies them and reports Java4Shell.

2. GitLab Orbit

GitLab Orbit indexes your projects, pipelines, security findings, and source code, including Java, into a context graph you can query. You can ask an agent to review an entire group. With Orbit enabled on the top-level group, an agent can list every project that contains Java code, including the projects that JDK container scanning misses. You can also ask Orbit which projects have open findings for CVE-2026-114938 once scans have run. Orbit indexes the default branch only and is in beta for Premium and Ultimate on GitLab.com and GitLab Self-Managed.

3. Projects by language

GitLab detects the languages in each project’s default branch, so a language filter lists every project that contains Java or Kotlin code, one row per project, whatever build tool it uses. Open Explore > Projects and filter by language, then again for Kotlin. Alternatively, you can get the list through the REST API:

      GET /groups/<group-id>/projects?with_programming_language=Java&include_subgroups=true

    

4. Compare with your runtime inventory

Container scanning, Orbit, and the language filter show what your projects declare and build, but Java can also run outside your GitLab projects. It often runs in application servers and products installed on hosts by hand, in CI runners and build servers, or in containers that still run in clusters without an active pipeline.

Compare the static results with an inventory of your running workloads from your configuration management (Ansible, Puppet, Chef, etc.), cloud, or VM inventory tools. Note which hosts run on affected x86-64 CPUs. For Kubernetes, operational container scanning scans the images that run in your clusters. It uses the same package-only detection as the container scanning in Step 1. Treat every Java runtime that appears in only one of the two views as a gap to investigate.

Remediate at scale with GitLab Duo Agent Platform

GitLab Duo can run the discovery steps above for you: pass it the list of projects filtered by language, or ask it to find them through Orbit. From there, let agents do the repetitive work, while keeping humans in the loop to review and merge.

To have agents open the fixes for every affected project:

  1. Set up a flow trigger on the Assign event, so the Developer Flow starts when someone assigns an issue.
  2. Turn on automatic reviews with the Code Review Flow to get a first review that follows your custom review instructions.
  3. Use Agentic Chat to create an epic with one issue per affected project, and assign the Developer Flow to each. The flow opens a merge request that updates the base image tag or package to a fixed version, or, where no fixed image exists yet, sets -XX:-UseBASE64Intrinsics in JAVA_TOOL_OPTIONS.
  4. Review and merge each merge request, then close the issue once the fixed version is deployed.

The merge request approval policy you set up with container scanning blocks any change that reintroduces a vulnerable Java version without approval. The scan execution policy keeps container scanning on in every project, so a regression appears in the vulnerability report.

Timeline

DateWhat happened
November 17, 21:00 UTCOpenJDK publishes its advisory and fixed releases, and Calif publishes its write-up.
November 17, 21:32 UTCCVE-2026-114938 is published.

We want to hear from you

Enjoyed reading this blog post or have questions or feedback? Share your thoughts by creating a new topic in the GitLab community forum.

Share your feedback

Start building faster today

See what your team can do with the intelligent orchestration platform for DevSecOps.