Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ workflow refuses a tag whose version has no entry here.

## [Unreleased]

### Security

- **Java4Shell (CVE-2026-114938) mitigated** (urbforge/urbex-cli#130): Keycloak's JVM, and the images of `runtime: java`, start with `-XX:-UseBASE64Intrinsics`, which turns off the OpenJDK Base64 intrinsic that corrupts memory on x86-64 CPUs with AVX-512 VBMI. Keycloak decodes Base64 before login, and its realms are public with Cloudflare. Run `urbex bootstrap` to apply it to an existing platform, and the `runtime: java` services get it with their next build (a push to `main` for staging, then a release for production). A Keycloak image with a fixed OpenJDK will follow when one is published.

## [0.1.0] - 2026-11-17

The first preview release: urbex as binaries for Linux and macOS (amd64,
Expand Down
3 changes: 3 additions & 0 deletions e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ step "bootstrap: base services and platform setup" '
[ "$(komodo_stack_state urbex-telemetry-$host)" = running ] || fail "telemetry stack of $host: $(komodo_stack_state urbex-telemetry-$host)"
[ "$(komodo_tags Stack urbex-telemetry-$host)" = agent ] || fail "telemetry stack of $host tags: $(komodo_tags Stack urbex-telemetry-$host)"
done
# Java4Shell (urbforge/urbex-cli#130): Keycloak'"'"'s JVM runs without
# the Base64 intrinsic (its processes, as the host sees them).
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -q root@$NET.203 "docker ps -q --filter label=urbex.service=keycloak | xargs -n1 docker top" | grep -q -- "-XX:-UseBASE64Intrinsics" || fail "keycloak runs its JVM with the Base64 intrinsic"
for svc in keycloak observability; do
grep -q "^sops_" /work/gitops/platform/$svc/secrets.sops.env || fail "platform/$svc/secrets.sops.env is not sops-encrypted"
done
Expand Down
17 changes: 17 additions & 0 deletions internal/bootstrap/public_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,3 +463,20 @@ func TestBaseServicesAreInTheCatalog(t *testing.T) {
}
}
}

// Java4Shell (urbforge/urbex-cli#130): Keycloak's JVM starts without
// the Base64 intrinsic, from the Stack's config.env.
func TestRun_KeycloakWithoutBase64Intrinsics(t *testing.T) {
dir := t.TempDir()
o, _, _ := newRunOrchestrator(t, &fakeProxmox{})
if err := o.Run(context.Background(), Options{GitOpsRepoPath: dir}); err != nil {
t.Fatalf("Run: %v", err)
}
env, err := os.ReadFile(filepath.Join(dir, "platform/keycloak/config.env"))
if err != nil {
t.Fatal(err)
}
if !strings.Contains(string(env), "\nJAVA_OPTS_APPEND=-XX:-UseBASE64Intrinsics\n") {
t.Errorf("keycloak config.env has no JAVA_OPTS_APPEND:\n%s", env)
}
}
11 changes: 11 additions & 0 deletions internal/bootstrap/stacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ func (o *Orchestrator) platformStacks(tunnelToken string) []PlatformStack {
"POSTGRES_DB": keycloakDBName,
"POSTGRES_USER": keycloakDBUser,
"KC_BOOTSTRAP_ADMIN_USERNAME": "admin",
// Java4Shell (CVE-2026-114938, urbforge/urbex-cli#130): OpenJDK's
// Base64 intrinsic on CPUs with AVX-512 VBMI corrupts memory, and
// Keycloak decodes Base64 before login. Off until a fixed image;
// kc.sh appends it to the JVM's options.
"JAVA_OPTS_APPEND": JavaMitigationFlags,
// Production mode wants HTTPS; TLS ends before Keycloak - at
// Cloudflare, or nowhere on the LAN.
"KC_HTTP_ENABLED": "true",
Expand Down Expand Up @@ -99,6 +104,12 @@ func (o *Orchestrator) platformStacks(tunnelToken string) []PlatformStack {
return stacks
}

// JavaMitigationFlags are the JVM flags every JVM Urbex runs gets:
// Keycloak, and the images of `runtime: java` (platform/dockerfiles).
// -XX:-UseBASE64Intrinsics mitigates Java4Shell (CVE-2026-114938,
// urbforge/urbex-cli#130) until the images carry a fixed OpenJDK.
const JavaMitigationFlags = "-XX:-UseBASE64Intrinsics"

// Keycloak's database and its owner, in the Keycloak Stack's PostgreSQL.
const (
keycloakDBName = "keycloak"
Expand Down
5 changes: 5 additions & 0 deletions platform/dockerfiles/java.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ FROM docker.io/library/eclipse-temurin:21-jre
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends wget \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /app.jar /app/app.jar
# Java4Shell (CVE-2026-114938, urbforge/urbex-cli#130): OpenJDK's Base64
# intrinsic corrupts memory on CPUs with AVX-512 VBMI; off until a fixed
# JRE. The JVM reads JAVA_TOOL_OPTIONS; an app that sets its own replaces
# it, and should keep this flag.
ENV JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics"
RUN useradd --no-create-home app
USER app
ENTRYPOINT ["java", "-jar", "/app/app.jar"]