# Sitecore Solr: Fix CVE-2026-114938 (Java4Shell)

**Java4Shell** (CVE-2026-114938) is a memory corruption bug in the OpenJDK Base64 decoder. It affects Java 17.0.6+ and 21, 25, 27 on x86-64 CPUs with AVX-512 VBMI. Java 8 and 11 are not affected.

Whether Solr is affected depends on the Java runtime it runs on, not on the Sitecore or Solr version - so verify your Solr first.

For the vulnerability details, see the [Tenable FAQ](https://www.tenable.com/blog/java4shell-cve-2026-114938-frequently-asked-questions-about-openjdk-rce-vulnerability).

---

## Check your Solr

_Solr admin UI_ - open the dashboard, e.g. `http://localhost:8984/solr/#/`. The **JVM** block shows **Runtime** (Java vendor and version) and **Args** (JVM startup flags).

_Solr API_ - the same data as JSON, in `jvm.version` and `jvm.jmx.commandLineArgs`:

```
http://localhost:8984/solr/admin/info/system?wt=json
```

_Kubernetes_ - run Java in the pod:

```powershell
kubectl exec solr-0 -n sc -- java -version
```

_Docker image_ - inspect the image without running it:

```powershell
docker buildx imagetools inspect <solr-image> --format "{{json .Image}}"
```

_Explanation_: the image environment contains `JAVA_VERSION`.

---

## Fix: `SOLR_OPTS`

Calif (the researchers who reported it) identified two Java startup options that keep the vulnerable code from running:

- `-XX:-UseBASE64Intrinsics` - turns off the Base64 shortcut
- `-XX:UseAVX=2` - turns off AVX-512 instructions

Solr start scripts (`bin/solr` on Linux, `solr.cmd` on Windows) read `SOLR_OPTS` from the environment and append it to the JVM command line. So the flag goes there - no image rebuild.

_AKS_ - StatefulSet container `env`:

```yaml
- name: SOLR_OPTS
  value: "-XX:-UseBASE64Intrinsics"
```

_Docker_ - `docker-compose.override.yml`:

```yaml
solr:
  environment:
    SOLR_OPTS: "-XX:-UseBASE64Intrinsics"
```

After the restart, the flag shows up in **Args** on the dashboard.

_Note_: make sure the pods actually rolled after `kubectl apply`. A typo in a `-XX` option stops the JVM from starting (`CrashLoopBackOff`), so roll out on dev first.

---

## Long-term

For Solr, the flag should already be enough. If you still want a patched Java runtime, build a custom Solr image on a fixed JRE build once your vendor publishes it.