# Java vulnerability CVE-2026-114938 ("Java4Shell") and CipherMail

**URL:** <https://community.ciphermail.com/t/java-vulnerability-cve-2026-114938-java4shell-and-ciphermail/1071>\
**Category:** General\
**Created:** [November 17, 2026, 10:56pm UTC](https://community.ciphermail.com/t/java-vulnerability-cve-2026-114938-java4shell-and-ciphermail/1071 "2026-11-17T22:56:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![martijn](https://dub1.discourse-cdn.com/flex017/user_avatar/community.ciphermail.com/martijn/32/127_2.png) [@martijn](https://community.ciphermail.com/u/martijn)\
**Post date:** [November 17, 2026, 10:56pm UTC](https://community.ciphermail.com/t/java-vulnerability-cve-2026-114938-java4shell-and-ciphermail/1071/1 "2026-11-17T22:56:04Z")

</div>

## Summary

A memory corruption vulnerability was published in the Base64 decoder of OpenJDK  
(CVE-2026-114938, also known as “Java4Shell”). The CipherMail back-end services run on Java, so we ask you to check every CipherMail gateway.

A gateway is only affected when Java uses its hardware-accelerated Base64 code, and whether it does depends on the processor of the machine the gateway runs on. On the installations we  
checked it was not in use. Because it depends on your hardware, you need to check your own  
systems.

If a gateway is affected, the hardware-accelerated Base64 code can be switched off with one  
small systemd override file. The override stays in place when the CipherMail playbook is run  
again. This note explains how to check, how to apply the override, and how to remove it once  
Java is patched.

## Background

According to the published advisory, the vulnerability:

- affects OpenJDK 17.0.6 and newer, and all Java distributions built from it;
- only exists on x86-64 processors with AVX-512 VBMI support, for example Intel Xeon  
“Ice Lake” and newer, and AMD EPYC and Ryzen “Zen 4” and newer. ARM64 is not affected;
- only exists when the Java option `UseBASE64Intrinsics` is enabled.

`UseBASE64Intrinsics` is not a setting you configure. Java enables it by itself at startup when  
it detects a suitable processor. On Java 17 this happens when the processor offers AVX-512. A  
virtual machine only sees the processor features the hypervisor passes on, so the result can  
differ between gateways, and it can change when a virtual machine is moved to other hardware or  
gets a different CPU model.

More information: [https://calif.io/java4shell/](https://calif.io/java4shell/) and the OpenJDK advisory at  
[https://openjdk.org/groups/vulnerability/advisories/2026-11-17](https://openjdk.org/groups/vulnerability/advisories/2026-11-17).

## Step 1: check whether a gateway is affected

Log in on the gateway and run:

```bash
java -XX:+PrintFlagsFinal -version | grep UseBASE64Intrinsics

```

The output looks like this:

```plaintext
     bool UseBASE64Intrinsics = false {product} {default}

```

- **`false`** : this gateway is not affected. No action is needed now. Repeat the check when the  
gateway is moved to other hardware or when the CPU model of the virtual machine changes.
- **`true`** : apply the workaround from step 2.

Run the check on every gateway, including every node of a cluster. The result of one machine  
says nothing about another.

## Step 2: disable UseBASE64Intrinsics

The workaround adds a systemd override file (“drop-in”) for each CipherMail back-end service.  
The file sets the `JAVA_TOOL_OPTIONS` environment variable, which Java reads at startup. Only  
the CipherMail services are changed; other Java programs on the machine are not.

Run the following as root:

```bash
for s in ciphermail-backend ciphermail-portal-backend ciphermail-company-portal-backend; do
  systemctl cat "$s" >/dev/null 2>&1 || continue
  mkdir -p /etc/systemd/system/$s.service.d
  printf '[Service]\nEnvironment=JAVA_TOOL_OPTIONS=-XX:-UseBASE64Intrinsics\n' \
    > /etc/systemd/system/$s.service.d/base64-intrinsics.conf
done
systemctl daemon-reload

```

A service which is not installed on the gateway is skipped.

Then restart the back-end services which are installed:

```bash
systemctl restart ciphermail-backend
systemctl restart ciphermail-portal-backend
systemctl restart ciphermail-company-portal-backend

```

Email which arrives during the restart is queued by Postfix and is delivered when the back-end  
is running again. On a cluster, do one node at a time.

### Check that the override is active

```bash
journalctl -u ciphermail-backend -b | grep 'Picked up JAVA_TOOL_OPTIONS'

```

The last line of the output should be:

```plaintext
Picked up JAVA_TOOL_OPTIONS: -XX:-UseBASE64Intrinsics

```

Repeat this for the other back-end services you restarted.

### Optional: ask the running process

Running the command from step 1 again does not show the effect of the override: it starts a new  
Java process outside the service and still reports `true`. To read the value from the running  
back-end process itself, use `jcmd`. This tool is part of the Java development kit (JDK) and is  
not available when only the Java runtime is installed.

The CipherMail services have a private `/tmp` directory, so `jcmd` must be started with  
`nsenter` inside the environment of the service, as the user the service runs as. Run the  
following as root:

```bash
for s in ciphermail-backend ciphermail-portal-backend ciphermail-company-portal-backend; do
  PID=$(systemctl show -p MainPID --value "$s" 2>/dev/null)
  if ["${PID:-0}" -eq 0]; then echo "== $s: not installed or not running"; continue; fi
  echo "== $s"
  nsenter -t $PID -m -S $(stat -c %u /proc/$PID) -G $(stat -c %g /proc/$PID) \
    jcmd $PID VM.flags -all | grep UseBASE64Intrinsics
done

```

This checks the gateway back-end and both portal back-ends. With the override active, the  
output for every running service is:

```plaintext
== ciphermail-backend
     bool UseBASE64Intrinsics = false {product} {command line}

```

`{command line}` shows that the value was set by the override. Every service which is installed  
on the gateway must show `false`. A service reported as “not installed or not running” which  
should be running was not restarted correctly; check it with `systemctl status`.

### Good to know

- The override file is not managed by the CipherMail playbook, so it stays in place when the  
playbook is run again.
- With the option disabled, Java uses its regular Base64 code. The gateway works the same.

## Step 3: remove the override when Java is patched

The override is a temporary measure. Install the Java update which fixes CVE-2026-114938 with  
the normal operating system updates as soon as it is available for your system, and check the  
security advisory of your distribution to confirm that the installed Java package contains the  
fix.

After the update is installed, run the following as root:

```bash
rm -f /etc/systemd/system/ciphermail-*.service.d/base64-intrinsics.conf
rmdir --ignore-fail-on-non-empty /etc/systemd/system/ciphermail-*.service.d 2>/dev/null
systemctl daemon-reload

```

Then restart the back-end services as in step 2. The restart is needed anyway, because a  
running service keeps using the old Java version until it is restarted.

To confirm that the override is gone, check that the service no longer has the variable:

```bash
systemctl show -p Environment ciphermail-backend

```

The output should not contain `JAVA_TOOL_OPTIONS`.

## Questions

Contact CipherMail support if you have questions about this note.
