Calif researchers have disclosed Java4Shell, a critical memory-corruption vulnerability in OpenJDK's Base64 decoder, tracked as CVE-2026-114938 with a CVSS score of 9.2. The flaw enables pre-authentication remote code execution in some of the most widely deployed Java applications on the planet — Jenkins, Jira, Keycloak, and effectively any product that passes untrusted input through java.util.Base64 decoding paths.
The headline detail is as elegant as it is alarming: a crafted payload of just 65 characters is sufficient to trigger critical code execution. That is shorter than most HTTP header values, shorter than a standard JWT fragment, and small enough to ride inside query parameters, cookie values, authentication headers, and JSON fields without tripping naive length-based inspection. OpenJDK is the world's most common Java runtime — it underpins enterprise CI/CD pipelines, identity providers, issue trackers, middleware, and a vast share of cloud-native services. When a bug this small lands in a library this ubiquitous, the blast radius is measured in millions of JVMs.
Patches are available. If you operate any internet-facing Java application — and statistically, you do — this is a patch-now, verify-later event.
Technical Analysis
What is affected
| Component | Detail |
|---|---|
| Root cause | Memory corruption in OpenJDK's Base64 decoder (java.util.Base64 / jdk.internal decode path) |
| CVE / Score | CVE-2026-114938 — CVSS 9.2 (Critical) |
| Exploitation | Pre-authentication, remote, network-deliverable |
| Payload size | ~65 crafted characters sufficient to trigger code execution |
| Known impacted applications | Jenkins, Jira, Keycloak — plus any application decoding attacker-controlled Base64 |
| Ecosystem impact | Any product/runtime built on vulnerable OpenJDK builds |
How the vulnerability works (defender's view)
The bug lives in the Base64 decoding implementation inside the JDK itself — not in application code, which is precisely what makes it so dangerous. Application developers routinely call Base64.getDecoder().decode(...) on untrusted input: authentication tokens, serialized objects, webhooks, form fields, agent registration payloads. Every one of those call sites now becomes a potential memory-corruption sink.
The attack chain from a defender's perspective:
- Delivery — The attacker submits a short (~65 character) malformed Base64 string to any endpoint that decodes it. Because the payload is compact, it fits inside HTTP headers, URL parameters, JSON bodies, and authentication flows. No authentication is required on affected endpoints.
- Trigger — The vulnerable decoder mishandles the malformed input, corrupting memory within the JVM process. Because the corruption occurs inside a trusted JDK code path, application-level input validation often never sees anything "wrong" — the string is syntactically plausible Base64 input.
- Execution — Controlled memory corruption is escalated to code execution inside the JVM process context. This is the critical pivot: the attacker's code runs with the full privileges of the Java service account — the Jenkins build user, the Keycloak realm administrator's underlying service identity, the Jira application account.
- Post-exploitation — From there, expect the standard pattern: the JVM spawns child processes (shells, downloaders, reconnaissance commands), establishes outbound C2, reads credential stores (Jenkins credentials.xml, Keycloak database, environment secrets), and pivots laterally. In the case of Jenkins specifically, code execution on the controller is effectively code execution across every build agent and every secret in the pipeline.
Why the "identity tier" framing matters
Jenkins, Jira, and Keycloak are not random examples — they sit at the center of the software supply chain and identity plane. Compromise of:
- Jenkins = access to every CI/CD secret, artifact signing key, and deployment credential. This is a supply-chain compromise waiting to happen.
- Keycloak = control of your identity broker. Forge tokens, mint sessions, impersonate anyone.
- Jira = internal project intelligence, ticket attachments, and a trusted pivot into employee workflows.
Treat any exposed instance of these applications as Tier 0 assets for remediation prioritization.
Exploitation status
- The vulnerability was disclosed by Calif researchers alongside patch availability.
- Given the trivial payload size, pre-auth nature, and the ubiquity of OpenJDK, assume weaponization timelines are measured in hours-to-days, not weeks. Base64-decoding endpoints are trivially discoverable via internet scanning (Shodan exposure of Jenkins/Keycloak/Jira is extensive), and the input surface requires zero authentication.
- Even in the absence of confirmed mass exploitation at time of writing, a 9.2 CVSS pre-auth RCE in the world's most common Java runtime should be handled with the same urgency posture as a confirmed KEV entry. Do not wait for a KEV listing to act.
Detection & Response
Because exploitation executes within the JVM process, network-layer and perimeter signatures will miss most of this. The highest-fidelity detections focus on what the JVM does after compromise: spawning child processes, making unexpected outbound connections, and touching credential stores. Any java process under a web application context spawning a shell is the single loudest indicator you can hunt for.
---
title: Java Application Process Spawning Shell or Script Interpreter
description: Detects java/java.exe processes (including Jenkins, Keycloak, and other JVM services) spawning shells or script interpreters — a primary post-exploitation indicator for CVE-2026-114938 (Java4Shell) and JVM RCE generally.
id: 9f1c3b72-4d5a-4e8b-b6c2-1a2b3c4d5e6f
status: experimental
references:
- https://securityaffairs.com/203387/hacking/65-characters-to-rce-inside-the-java4shell-vulnerability.html
- https://attack.mitre.org/techniques/T1059/
author: Security Arsenal
date: 2026/04/06
tags:
- attack.execution
- attack.t1059
- attack.t1190
logsource:
category: process_creation
product: windows
detection:
selection_parent:
ParentImage|endswith:
- '\java.exe'
- '\javaw.exe'
- '\jenkins.exe'
- '\jboss-modules.jar'
selection_child:
Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\wscript.exe'
- '\cscript.exe'
- '\mshta.exe'
- '\rundll32.exe'
- '\certutil.exe'
- '\curl.exe'
- '\bitsadmin.exe'
condition: selection_parent and selection_child
falsepositives:
- Jenkins pipeline jobs legitimately invoking build steps (cmd/powershell) — baseline per-agent and filter known job workspace paths
- Application startup scripts invoking shell wrappers
level: high
---
title: JVM Process Establishing Outbound Connection to Rare External Host
description: Detects Java runtime processes initiating outbound network connections to external hosts — consistent with post-exploitation C2 or payload retrieval following Java4Shell (CVE-2026-114938) exploitation. Tune against known application egress (update servers, IdP endpoints, artifact repositories).
id: 2b7e4a19-8c3d-4f5e-9a1b-6c7d8e9f0a1b
status: experimental
references:
- https://securityaffairs.com/203387/hacking/65-characters-to-rce-inside-the-java4shell-vulnerability.html
- https://attack.mitre.org/techniques/T1071/
author: Security Arsenal
date: 2026/04/06
tags:
- attack.command_and_control
- attack.t1071
logsource:
category: network_connection
product: windows
detection:
selection:
Image|endswith:
- '\java.exe'
- '\javaw.exe'
Initiated: 'true'
filter_local:
DestinationIp|startswith:
- '10.'
- '192.168.'
- '172.16.'
- '172.17.'
- '172.18.'
- '172.19.'
- '172.2'
- '172.30.'
- '172.31.'
- '127.'
condition: selection and not filter_local
falsepositives:
- Legitimate egress to Maven Central, update servers, SSO providers, cloud metadata — build an allowlist of known destinations per application before enabling at high severity
level: medium
---
title: Suspicious Access to Jenkins or Keycloak Credential Stores
description: Detects non-service processes accessing Jenkins credential stores or Keycloak configuration/database files — consistent with credential theft following JVM compromise via CVE-2026-114938.
id: 4d8f2e61-7a9b-4c3d-8e5f-0b1c2d3e4f5a
status: experimental
references:
- https://securityaffairs.com/203387/hacking/65-characters-to-rce-inside-the-java4shell-vulnerability.html
- https://attack.mitre.org/techniques/T1552/
author: Security Arsenal
date: 2026/04/06
tags:
- attack.credential_access
- attack.t1552.001
logsource:
category: file_event
product: windows
detection:
selection:
TargetFilename|contains:
- '\credentials.xml'
- '\secrets\master.key'
- '\standalone.xml'
- '\keycloak.conf'
filter_java:
Image|endswith:
- '\java.exe'
- '\javaw.exe'
condition: selection and not filter_java
falsepositives:
- Backup agents and configuration management tooling — allowlist by process hash and service account
level: high
// Hunt: JVM processes (Jenkins, Keycloak, Jira, generic java) spawning shells or LOLBins
// Post-exploitation indicator for CVE-2026-114938 (Java4Shell) — JVM RCE leading to child process execution
let Lookback = 7d;
let SuspiciousChildren = dynamic([
"cmd.exe", "powershell.exe", "pwsh.exe", "mshta.exe", "wscript.exe",
"cscript.exe", "rundll32.exe", "certutil.exe", "bitsadmin.exe", "curl.exe",
"wget.exe", "sh", "bash", "dash", "python", "python3", "nc", "ncat"
]);
DeviceProcessEvents
| where Timestamp > ago(Lookback)
| where InitiatingProcessFileName in~ ("java.exe", "javaw.exe", "java", "javaw")
or InitiatingProcessCommandLine has_any ("jenkins", "keycloak", "jira", "catalina", "jboss", "wildfly", "tomcat")
| where FileName in~ (SuspiciousChildren)
| project Timestamp, DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine,
FileName, ProcessCommandLine, AccountName, SHA256, InitiatingProcessId
| order by Timestamp desc
// Hunt: Unexpected outbound connections from JVM processes to rare destinations
// C2 / payload retrieval after Java4Shell exploitation. Ingest Linux syslog/CEF for non-Windows hosts.
let Lookback = 7d;
let KnownEgress = dynamic(["repo.maven.apache.org", "repo1.maven.org", "updates.jenkins.io", "login.microsoftonline.com"]);
DeviceNetworkEvents
| where Timestamp > ago(Lookback)
| where InitiatingProcessFileName in~ ("java.exe", "javaw.exe", "java")
or InitiatingProcessCommandLine has_any ("jenkins", "keycloak", "jira", "catalina")
| where not(RemoteIP has_any ("10.", "192.168.", "172.16.", "127."))
| where not(RemoteUrl has_any (KnownEgress))
| summarize ConnectionCount = count(), FirstSeen = min(Timestamp), LastSeen = max(Timestamp)
by DeviceName, InitiatingProcessFileName, RemoteIP, RemoteUrl, RemotePort
| order by ConnectionCount asc // rare destinations bubble to the top
// Linux hosts: hunt Syslog/CommonSecurityLog for java child-process anomalies and short Base64-shaped request payloads
let Lookback = 7d;
union isfuzzy=true
(Syslog
| where TimeGenerated > ago(Lookback)
| where SyslogMessage has_any ("sh -c", "/bin/bash", "curl ", "wget ")
| where SyslogMessage has_any ("java", "jenkins", "keycloak", "jira")),
(CommonSecurityLog
| where TimeGenerated > ago(Lookback)
| where DeviceProduct has_any ("jenkins", "keycloak", "jira", "tomcat")
| where Message has_any ("decode", "base64", "IllegalArgumentException")
| where Severity >= 5)
| project TimeGenerated, Computer, DeviceProduct, SyslogMessage, Message, Severity, SourceIP
| order by TimeGenerated desc
-- Velociraptor hunt: Java4Shell (CVE-2026-114938) post-exploitation triage
-- 1) Find JVM processes that have spawned shell/script children
-- 2) List active outbound network connections owned by JVM processes
-- Part 1: Suspicious JVM child processes
SELECT Pid, Ppid, Name, Exe, CommandLine, Username, CreateTime
FROM pslist()
WHERE Name =~ '(?i)^(cmd|powershell|pwsh|sh|bash|dash|curl|wget|nc|ncat|python)'
AND Ppid IN (
SELECT Pid FROM pslist()
WHERE Name =~ '(?i)java' OR CommandLine =~ '(?i)(jenkins|keycloak|jira|catalina|tomcat)'
)
-- Part 2: Outbound connections owned by JVM processes
SELECT Pid, Name, Status, Laddr, Raddr
FROM netstat()
WHERE Name =~ '(?i)java'
AND Status =~ 'ESTAB'
AND NOT Raddr.IP =~ '^(10\\.|192\\.168\\.|172\\.(1[6-9]|2[0-9]|3[01])\\.|127\\.|::1|fe80)'
ORDER BY Raddr.IP
-- Part 3: Locate Jenkins/Keycloak credential artifacts for DFIR scoping
SELECT FullPath, Size, Mtime, Atime
FROM glob(globs=[
'C:/ProgramData/Jenkins/**/credentials.xml',
'C:/ProgramData/Jenkins/**/secrets/master.key',
'/var/lib/jenkins/credentials.xml',
'/var/lib/jenkins/secrets/master.key',
'/opt/keycloak/conf/keycloak.conf',
'/opt/jboss/keycloak/standalone/configuration/standalone.xml'
])
Remediation
Immediate actions (next 24 hours)
- Inventory every OpenJDK runtime. This bug is in the JDK, not an application — you cannot scope it by product alone. Enumerate all JVMs across servers, containers, build agents, and appliances. Don't forget bundled runtimes: Jenkins, Jira, and Keycloak frequently ship or pin their own JRE that your OS package manager never touches.
- Apply the patched OpenJDK builds immediately. Update to the fixed releases published with the Calif disclosure per your vendor's advisory (OpenJDK project advisory and your distribution's security tracker — e.g.,
https://openjdk.org/groups/vulnerability/advisories, Red Hat, Ubuntu, Amazon Corretto, Azul, and Microsoft Build of OpenJDK each ship their own patched builds). Prioritize internet-facing and auth-adjacent systems: Keycloak first, Jenkins controllers second, then Jira and everything else. - Rebuild container images. Updating the host does nothing for JVMs baked into images. Rebuild and redeploy every image with a vulnerable base layer, and force-registry-scan for stale OpenJDK layers.
- If you cannot patch within 24 hours, remove the exposure: take Keycloak/Jenkins/Jira off the public internet behind VPN or an authenticated reverse proxy. For a pre-auth bug of this class, access gating is your only meaningful compensating control.
Verification script
#!/bin/bash
# CVE-2026-114938 (Java4Shell) — OpenJDK exposure inventory and verification
# Run as root on Linux hosts. Reports every java runtime and flags unpatched candidates.
echo "=== [1] All java binaries on disk (including bundled JREs) ==="
find / -type f -name "java" -perm -u+x 2>/dev/null | while read -r jbin; do
ver=$("$jbin" -version 2>&1 | head -1)
echo "$jbin :: $ver"
done
echo ""
echo "=== [2] Running JVM processes and their owning services ==="
ps -eo pid,user,comm,args | grep -E '[j]ava' | awk '{print $1, $2, substr($0, index($0,$4), 120)}'
echo ""
echo "=== [3] Package-managed OpenJDK versions ==="
if command -v dpkg &>/dev/null; then
dpkg -l | grep -Ei 'openjdk|java-.*-jdk' | awk '{print $2, $3}'
elif command -v rpm &>/dev/null; then
rpm -qa | grep -Ei 'openjdk|java' | sort
fi
echo ""
echo "=== [4] Container images with embedded java layers ==="
if command -v docker &>/dev/null; then
docker images --format '{{.Repository}}:{{.Tag}}' | while read -r img; do
if docker run --rm --entrypoint sh "$img" -c 'command -v java' &>/dev/null; then
echo "CONTAINS JAVA: $img"
fi
done
fi
echo ""
echo "=== [5] Exposed listeners on common app ports (8080/8443/8009/9990) ==="
ss -tlnp 2>/dev/null | grep -E ':(8080|8443|8009|9990|8081)' || echo "No common Java app ports listening."
echo ""
echo "ACTION: Cross-reference every version above against your vendor's patched build list for CVE-2026-114938."
Hardening after patching
- Isolate the JVM blast radius. Run Jenkins/Keycloak/Jira under dedicated low-privilege service accounts with no sudo, restricted filesystem scope, and egress firewalling to an explicit allowlist. If the JVM is popped, the post-exploitation detections above only help if the attacker can't simply walk away with the host.
- Egress control is your second patch. A JVM that cannot reach arbitrary internet destinations cannot pull second stages or establish easy C2. Deny-by-default egress for application servers is the single highest-ROI control against this entire vulnerability class.
- Rotate credentials after exposure. If any vulnerable instance was internet-reachable and unpatched, treat it as potentially compromised: rotate Jenkins credential store entries, Keycloak realm keys and client secrets, and any secrets present in JVM environment variables. Pre-auth RCE with a 65-character payload leaves almost no forensic footprint before the patch — absence of evidence is not evidence of absence.
- Add the hunt queries above to scheduled detection. Run the KQL hunts daily for at least 30 days post-patch to catch pre-patch compromise.
- Upstream dependency audit. Identify internal applications calling
Base64.getDecoder()on request input — after patching the runtime, these call sites are safe again, but this incident is a forcing function to inventory your decode-on-untrusted-input attack surface.
The Bottom Line
Java4Shell is the uncomfortable reminder that the Java ecosystem's greatest strength — one runtime everywhere — is also its systemic risk. A 65-character string in a decoding path that developers invoke thousands of times a day across millions of services should concentrate every defender's mind. Patch the JDK, not just the applications. Gate your identity and CI/CD tier off the public internet. And hunt for JVM child processes like your supply chain depends on it — because it does.
Related Resources
Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub
Is your security operations ready?
Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.