Repository navigation
Conversation
…untime: java without the Base64 intrinsic Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA
stefanoghinelli
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mitigates Java4Shell (CVE-2026-114938, #130) in every JVM Urbex runs, until images with a fixed OpenJDK exist. The mitigation is
-XX:-UseBASE64Intrinsics, Keycloak's recommended one: it turns off the OpenJDK Base64 intrinsic that corrupts memory on x86-64 CPUs with AVX-512 VBMI.internal/bootstrap/stacks.go: Keycloak's Stack getsJAVA_OPTS_APPEND=-XX:-UseBASE64Intrinsicsin itsconfig.env(JavaMitigationFlags).kc.shappends it to the JVM's options.urbex bootstraprewritesconfig.env, so compose recreates Keycloak on existing platforms too.platform/dockerfiles/java.Dockerfile: theruntime: javaimage (Temurin 21 JRE) setsJAVA_TOOL_OPTIONS=-XX:-UseBASE64Intrinsics. Services get it with their next build. An app that sets its ownJAVA_TOOL_OPTIONSreplaces it, as the comment says.e2e/run.sh: Keycloak's Java process carries the flag (docker topon its LXC).internal/bootstrap/public_test.go: Keycloak'sconfig.envhas it.CHANGELOG.md: a### Securityentry under Unreleased, for a patch release if Teg decides on one.Still to do (issue's second point): bump to a Keycloak image with a fixed OpenJDK, pinned by digest, once one is published; then decide whether to keep the flag.
Companion: urbforge/urbex#101.
Why
#130: pre-login exploitation is reported in Keycloak, and Urbex's realms are public with Cloudflare. A platform on a CPU with AVX-512 VBMI (recent Intel Xeon/Core, AMD Zen 4/5) is exposed.
Tests I ran
mise run test,mise run lint: pass.mise run e2e: passed, 24 steps, with the new check that Keycloak's JVM runs with-XX:-UseBASE64Intrinsics, and Keycloak's logins (the projects' realms) working.quay.io/keycloak/keycloak:26.7.5(OpenJDK 21.0.12.1) withJAVA_OPTS_APPEND: the flag is in the JVM's command line, and an admin login works;eclipse-temurin:21-jrewithJAVA_TOOL_OPTIONS:UseBASE64Intrinsics = false {environment}.Checklist before review
Part of #130 (the mitigation; the fixed image follows).
🤖 Generated with Claude Code
https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA