Security Advisory: Java4Shell Vulnerability (CVE)

Security Advisory: Java4Shell Vulnerability (CVE)

A critical CVE has been filed regarding the Java4Shell vulnerability, which affects Java’s built-in Base64 intrinsic implementation. For further technical details regarding the vulnerability, please review the security research published at Java4Shell: Write once, RCE everywhere .

Impact on Canton and Associated Infrastructure

Canton uses Base64 encoding primarily for non-performance critical tasks, such as authentication token decoding. However, other components commonly deployed alongside Canton, including Keycloak, are confirmed to be affected as well.

Status and Mitigation Recommendations

OpenJDK and other downstream vendors have not yet released official bugfixes. Canton will publish patch releases as soon as vendor fixes become available. In the interim, Canton engineers have verified that running the JRE with the flag -XX:-UseBASE64Intrinsics (as recommended by the security researchers) incurs no adverse performance impact on Canton. The Canton team strongly recommends applying this JVM flag until official patches are deployed.

The below details how to apply this flag in the official Canton docker and kubernetes tooling.

Applying the Java flag in Docker

The validator start script must be invoked with the following environment variables available:

export VALIDATOR_JVM_OPTS="-XX:+UseG1GC -XX:+UseStringDeduplication -XX:MaxRAMPercentage=75 -XX:InitialRAMPercentage=75 -Dscala.concurrent.context.numThreads=8 -XX:ActiveProcessorCount=8 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/heap-dumps -XX:-UseBASE64Intrinsics"
export PARTICIPANT_JVM_OPTS="-XX:+UseG1GC -XX:+UseStringDeduplication -XX:MaxRAMPercentage=75 -XX:InitialRAMPercentage=75 -Dscala.concurrent.context.numThreads=12 -XX:ActiveProcessorCount=12 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/heap-dumps -XX:-UseBASE64Intrinsics"

Applying the Java flag in Kubernetes

Add the following helm value to the participant and validator helm chart deployment:

additionalJvmOptions: -XX:-UseBASE64Intrinsics
3 Likes