From 7a9b1479f380bb9903dde8532bf51f8dd81b6de6 Mon Sep 17 00:00:00 2001 From: Marc Byrd Date: Wed, 18 Nov 2026 14:43:45 -0600 Subject: [PATCH 1/4] Document an interim mitigation for CVE-2026-114938 ("Java4Shell") CVE-2026-114938 is a critical heap-overflow RCE in the JDK's AVX-512 Base64 decoder intrinsic, disclosed 2026-11-17. It affects OpenJDK 17.0.6+, 21, 25 and 27 (not 8 or 11) on x86-64 hosts with AVX-512 VBMI support. Researchers demonstrated post-auth RCE against Solr; both BasicAuthPlugin and PKIAuthenticationPlugin decode request-supplied Base64 input directly. No JDK vendor (Temurin, Zulu, Oracle's own OSS builds, Debian) has shipped a GA patched build for the 17/21/25 lines yet, so there is no dependency bump that fixes this. This documents the universally recommended interim mitigation, -XX:-UseBASE64Intrinsics, in solr.in.sh/solr.in.cmd as an opt-in commented-out setting, following the exact same pattern already used here for CVE-2021-44228 (log4j2.formatMsgNoLookups). The flag is a generic HotSpot product flag (globals.hpp) honored on every architecture, so enabling it is a no-op on platforms this CVE doesn't affect. Co-Authored-By: Claude Sonnet 5 --- solr/bin/solr.in.cmd | 9 +++++++++ solr/bin/solr.in.sh | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/solr/bin/solr.in.cmd b/solr/bin/solr.in.cmd index cc488390828f..b1467f18d165 100755 --- a/solr/bin/solr.in.cmd +++ b/solr/bin/solr.in.cmd @@ -248,6 +248,15 @@ REM Some previous versions of Solr use an outdated log4j dependency. If you are REM then enable the following setting to address CVE-2021-44228 REM set SOLR_OPTS=%SOLR_OPTS% -Dlog4j2.formatMsgNoLookups=true +REM CVE-2026-114938 ("Java4Shell") is a heap-overflow RCE in the JDK's AVX-512 Base64 decoder +REM intrinsic. It affects OpenJDK 17.0.6+, 21, 25 and 27 (not 8 or 11) running on x86-64 hosts with +REM AVX-512 VBMI support; Solr's BasicAuthPlugin and PKIAuthenticationPlugin both decode +REM request-supplied Base64 input. If your JDK vendor has not yet shipped a build with the fix +REM (17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 or later), enable the following setting as an interim +REM mitigation. It disables the intrinsic in favor of the plain decoder and is safe on any platform, +REM including ones unaffected by this CVE. +REM set SOLR_OPTS=%SOLR_OPTS% -XX:-UseBASE64Intrinsics + REM The bundled plugins in the "modules" folder can easily be enabled as a comma-separated list in SOLR_MODULES variable REM set SOLR_MODULES=extraction,ltr diff --git a/solr/bin/solr.in.sh b/solr/bin/solr.in.sh index 569066fede45..9e00aebfb5cc 100644 --- a/solr/bin/solr.in.sh +++ b/solr/bin/solr.in.sh @@ -280,6 +280,15 @@ # then enable the following setting to address CVE-2021-44228 #SOLR_OPTS="$SOLR_OPTS -Dlog4j2.formatMsgNoLookups=true" +# CVE-2026-114938 ("Java4Shell") is a heap-overflow RCE in the JDK's AVX-512 Base64 decoder +# intrinsic. It affects OpenJDK 17.0.6+, 21, 25 and 27 (not 8 or 11) running on x86-64 hosts with +# AVX-512 VBMI support; Solr's BasicAuthPlugin and PKIAuthenticationPlugin both decode +# request-supplied Base64 input. If your JDK vendor has not yet shipped a build with the fix +# (17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 or later), enable the following setting as an interim +# mitigation. It disables the intrinsic in favor of the plain decoder and is safe on any platform, +# including ones unaffected by this CVE. +#SOLR_OPTS="$SOLR_OPTS -XX:-UseBASE64Intrinsics" + # The bundled plugins in the "modules" folder can easily be enabled as a comma-separated list in SOLR_MODULES variable #SOLR_MODULES=extraction,ltr From 1feae089d522f8c0d7906c8941995bd132cb2c69 Mon Sep 17 00:00:00 2001 From: Marc Byrd Date: Wed, 18 Nov 2026 14:45:49 -0600 Subject: [PATCH 2/4] Add changelog fragment for PR#5364 Co-Authored-By: Claude Sonnet 5 --- .../PR#5364-java4shell-solr-opts-mitigation.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 changelog/unreleased/PR#5364-java4shell-solr-opts-mitigation.yml diff --git a/changelog/unreleased/PR#5364-java4shell-solr-opts-mitigation.yml b/changelog/unreleased/PR#5364-java4shell-solr-opts-mitigation.yml new file mode 100644 index 000000000000..ee4962afdab1 --- /dev/null +++ b/changelog/unreleased/PR#5364-java4shell-solr-opts-mitigation.yml @@ -0,0 +1,11 @@ +# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc +title: > + Document an opt-in -XX:-UseBASE64Intrinsics setting in solr.in.sh/solr.in.cmd as an interim + mitigation for CVE-2026-114938 ("Java4Shell"), a JDK-level Base64 decoder RCE, until JDK vendors + ship a patched build +type: security # added, changed, fixed, deprecated, removed, dependency_update, security, other +authors: + - name: Marc Byrd +links: + - name: PR#5364 + url: https://github.com/apache/solr/pull/5364 From 75abc65a281fbdae0ff9c3bdb2a8000847f0be8f Mon Sep 17 00:00:00 2001 From: Marc Byrd Date: Wed, 18 Nov 2026 15:07:11 -0600 Subject: [PATCH 3/4] Enable the CVE-2026-114938 mitigation by default in the Docker image Unlike bin/solr.in.sh, where the equivalent setting is left as an opt-in comment, enable -XX:-UseBASE64Intrinsics by default in the Docker image's /etc/default/solr.in.sh. Users who just pull the published image don't necessarily read solr.in.sh, and this is a shipped artifact the project already controls end to end, unlike third-party JDK builds. Verified via createDockerfileLocal/createDockerfileOfficialFull/ createDockerfileOfficialSlim that the rendered Dockerfiles pick this up correctly. Could not do a live `docker build` in this environment (no local Docker daemon). Co-Authored-By: Claude Sonnet 5 --- solr/docker/templates/Dockerfile.body.template | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/solr/docker/templates/Dockerfile.body.template b/solr/docker/templates/Dockerfile.body.template index 6d3de192e5da..ccdfabc1eab2 100644 --- a/solr/docker/templates/Dockerfile.body.template +++ b/solr/docker/templates/Dockerfile.body.template @@ -67,6 +67,13 @@ RUN set -ex; \ mkdir -p -m0770 /var/solr; \ chown -R "$SOLR_USER:0" /var/solr; +# Interim mitigation for CVE-2026-114938 ("Java4Shell"), a heap-overflow RCE in the JDK's AVX-512 +# Base64 decoder intrinsic (OpenJDK 17.0.6+/21/25/27 on x86-64 hosts with AVX-512 VBMI). Enabled by +# default in this image, unlike the commented-out example in solr.in.sh, since users who just pull +# the published image don't necessarily read that file. Remove once the image is rebuilt on a JDK +# carrying the fix (17.0.21.1/21.0.13.1/25.0.5.1/27.0.1.1+), or override SOLR_OPTS to drop it. +RUN echo 'SOLR_OPTS="$SOLR_OPTS -XX:-UseBASE64Intrinsics"' >> /etc/default/solr.in.sh; + RUN set -ex; \ apt-get update; \ apt-get -y --no-install-recommends install curl acl procps wget netcat-openbsd tini jattach; \ From df02c476251731aad334877063de5d74feb223ce Mon Sep 17 00:00:00 2001 From: Marc Byrd Date: Wed, 18 Nov 2026 15:07:31 -0600 Subject: [PATCH 4/4] Update changelog fragment to cover the Docker image default too Co-Authored-By: Claude Sonnet 5 --- .../unreleased/PR#5364-java4shell-solr-opts-mitigation.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/changelog/unreleased/PR#5364-java4shell-solr-opts-mitigation.yml b/changelog/unreleased/PR#5364-java4shell-solr-opts-mitigation.yml index ee4962afdab1..40813dff5661 100644 --- a/changelog/unreleased/PR#5364-java4shell-solr-opts-mitigation.yml +++ b/changelog/unreleased/PR#5364-java4shell-solr-opts-mitigation.yml @@ -1,8 +1,8 @@ # See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc title: > - Document an opt-in -XX:-UseBASE64Intrinsics setting in solr.in.sh/solr.in.cmd as an interim - mitigation for CVE-2026-114938 ("Java4Shell"), a JDK-level Base64 decoder RCE, until JDK vendors - ship a patched build + Mitigate CVE-2026-114938 ("Java4Shell"), a JDK-level Base64 decoder RCE, until JDK vendors ship a + patched build: -XX:-UseBASE64Intrinsics is now enabled by default in the Docker image, and + documented as an opt-in commented-out setting in solr.in.sh/solr.in.cmd for other distributions type: security # added, changed, fixed, deprecated, removed, dependency_update, security, other authors: - name: Marc Byrd