Apache Shiro’s ActiveDirectoryRealm authenticates a user by binding to the directory with the credentials the user typed. LDAP servers that permit anonymous binds accept a bind with an empty name and an empty password, and a realm that does not check for that case takes the directory’s “success” as proof of identity. Shiro fixed exactly this in 2014 for its JNDI LDAP realm, CVE-2014-0074, but the fix “was incomplete for ActiveDirectoryRealm”, which “still accepted an empty username and password as an anonymous LDAP bind”, so “an unauthenticated user” could “log in with an empty principal”. The precondition is a realm configured without principalSuffix against a directory that allows anonymous binds. Upgrade to Shiro 3.0.2; until then set principalSuffix on the realm or switch anonymous binds off on the directory, either of which closes it.
CVE-2026-137686 at a glance.
| Component | Apache Shiro, ActiveDirectoryRealm in shiro-core: the bind-based authentication path. The JNDI LdapRealm and DefaultLdapRealm, which received the 2014 fix, are not named in the record |
| Affected versions | every Shiro release through 3.0.1, per the Apache CNA record; “only when ActiveDirectoryRealm is used without principalSuffix and the directory server allows anonymous binds” |
| Fixed in | Shiro 3.0.2, released 8 November 2026 (the GitHub release and the project’s news archive agree on the date; the release notes list the fix among four security pull requests without CVE ids). No distribution ships a current Shiro: Debian’s shiro package is 1.3.2; Ubuntu lists the same package as needing evaluation |
| Severity | Apache (CNA) CVSS 4.0 6.3 Medium (AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N; the AT:P is the two configuration preconditions), CWE-287 (improper authentication); Apache’s own label is Medium. Ubuntu Medium; Debian no urgency set; Red Hat’s page refused automated readers (Shiro is not shipped); NVD Received with the CNA score only |
| Exploited in the wild | Not on CISA’s Known Exploited Vulnerabilities list as of 1 December 2026 (catalogue 2026.11.30). EPSS 0.00500 (35.9th percentile) on 30 November 2026 |
| Who is exposed | Java applications that authenticate against Active Directory or another LDAP server through Shiro’s ActiveDirectoryRealm, configured without a principalSuffix, against a directory that answers an empty bind with success. Active Directory accepts an anonymous simple bind by default and returns success for it; what it refuses, until an administrator sets the seventh character of dSHeuristics, is anonymous reading of anything beyond the rootDSE. The bind succeeding is all this flaw needs, so a realm pointed at a default domain controller without a suffix is in the exposed shape; other LDAP servers vary. What the attacker gets is a session for an empty principal, which is whatever the application grants a logged-in user with no name and no group memberships |
| Published | Apache announcement 14 November 2026 (the project’s news item “Critical security advisories: LDAP realm and cookie fixes”) and CVE record 27 November 2026; this page built 1 December 2026, last updated 1 December 2026 |
What it is
An LDAP simple bind carries a distinguished name and a password, and the protocol defines two special cases: a bind with an empty name and an empty password is an anonymous bind, and a bind with a name but an empty password is an unauthenticated bind. Both return success on a server that permits them, and neither proves anything about the caller. An application that authenticates users by attempting a bind with their typed credentials therefore has to refuse empty values itself, before the request leaves the host, because the directory’s answer to an empty bind is not “wrong password”.
Shiro’s JNDI-based realm learned that in 2014; ActiveDirectoryRealm, which builds the bind name as username + principalSuffix and talks to the directory through its own context factory, did not. With no principalSuffix configured the bind name for an empty username is itself empty, and together with an empty password the realm sends an anonymous bind, receives success, and returns an AuthenticationInfo for the empty principal. That is CWE-287, improper authentication: the check ran, and it asked the wrong question. The CNA vector’s low confidentiality impact reflects that the resulting session belongs to nobody; what it can see depends on what the application shows to any authenticated subject.
The 3.0.2 fix makes the realm reject empty credentials before binding, bringing it in line with the 2014 change. The project’s mitigation for an application that cannot upgrade is either of the two preconditions removed: a principalSuffix such as @corp.example turns the empty username into a non-empty, non-existent bind name that the directory refuses, and disabling anonymous binds on the server refuses the request at the other end. The credit is to Sungho Park. Apache’s announcement thread renders only as an application shell to automated readers; the facts above are from the CVE record and the project’s security reports page.
Who is affected on Linux
Each row is what the distribution’s own security tracker said on 1 December 2026; the link in the row is the tracker page, which will be newer than this one. Shiro is a Maven dependency, so the row that matters is the last one.
| Distribution | Status | Fixed package |
|---|---|---|
| Alpine | Not consulted for this page; Alpine does not package Shiro | — |
| Debian | The tracker page carries the description but no package table on 1 December; the shiro source package in Debian is 1.3.2, which the record’s “through 3.0.1” covers | nothing on 1 December 2026 |
| Ubuntu | Priority Medium; the shiro package is “Needs evaluation” on every release from 16.04 to 26.10; no fixed version | — |
| RHEL, Rocky, Alma, CentOS Stream | No page (client error); Red Hat does not ship Shiro | — |
| openSUSE/SLE | Not consulted for this page; SUSE does not ship Shiro | — |
| Maven Central, application bundles, containers with a vendored jar | The upstream release applies; every application that depends on the affected artefact needs a rebuild | shiro-core 3.0.2 |
How to check
Three questions, in order: does the application load Shiro below 3.0.2; does it use ActiveDirectoryRealm and with what principalSuffix; and does the directory it binds to accept an anonymous bind. The third can be answered from any host with ldapsearch, without credentials, which is rather the point.
# 1. the Shiro jars an application actually loads (3.0.2 is fixed; 3.0.1 and below are affected)
for p in $(pgrep -x java); do tr '\0' '\n' < /proc/$p/cmdline | grep -oE '[^:]*shiro-[a-z-]+-[0-9][^:]*\.jar' | sed "s/^/pid $p: /"; done
find / -name 'shiro-*.jar' 2>/dev/null | grep -vE '/\.m2/' | sort -u
for w in /opt/*/*.war /opt/*/*.jar; do unzip -l "$w" 2>/dev/null | grep -oE 'shiro-[a-z-]+-[0-9][^ ]*\.jar' | sed "s|^|$w: |"; done 2>/dev/null
# 2. the realm and its suffix, in shiro.ini or the Java configuration
grep -rnE 'ActiveDirectoryRealm|principalSuffix' --include='shiro.ini' --include='*.ini' --include='*.java' --include='*.xml' --include='*.properties' /opt /srv /etc 2>/dev/null | head
# a realm line without a principalSuffix line beside it is the exposed shape
# 3. does the directory accept an anonymous simple bind? (an empty -D and -w; success here is the second precondition)
ldapsearch -x -H ldap://dc.corp.example -D '' -w '' -b '' -s base '(objectClass=*)' namingContexts 2>&1 | head -5
ldapsearch -x -H ldap://dc.corp.example -D '' -w '' -b 'DC=corp,DC=example' -s one '(objectClass=user)' sAMAccountName 2>&1 | head -5An application on 3.0.2, or one whose realms are not ActiveDirectoryRealm, is done. Below 3.0.2 with the realm configured, a principalSuffix beside it closes the first precondition, and the second is closed only if the directory refuses the anonymous bind itself, which shows in step 3 as a bind error (“inappropriate authentication”, “unwilling to perform”) on the first search. Active Directory’s default answers the first search and refuses the second with “operations error”: the bind succeeded, which is the precondition. Both preconditions present is the exposed case, and the application’s login audit will show a session with an empty principal if anyone has already found it.
How to fix it
Bump the dependency to 3.0.2, rebuild, redeploy and restart; a Java service keeps the old jar until it is restarted, and a container keeps it until the image is rebuilt.
# Maven: in the pom, then verify what resolved
# <shiro.version>3.0.2</shiro.version>
mvn -q dependency:tree -Dincludes=org.apache.shiro | grep shiro
# Gradle
./gradlew dependencies --configuration runtimeClasspath | grep shiro
# then rebuild the artefact, redeploy, restart the service and confirm the loaded jar
systemctl restart myapp && sleep 5 && for p in $(pgrep -x java); do tr '\0' '\n' < /proc/$p/cmdline | grep -o 'shiro-[a-z-]*-3\.0\.2\.jar'; doneThe project’s two alternatives both work without a rebuild. Setting principalSuffix is a one-line change to shiro.ini and a restart; disabling anonymous binds is a directory-side change that protects every client, not only this one:
# shiro.ini: give the realm a suffix so an empty username cannot become an empty bind name
[main]
adRealm = org.apache.shiro.realm.activedirectory.ActiveDirectoryRealm
adRealm.url = ldap://dc.corp.example:389
adRealm.principalSuffix = @corp.example
# OpenLDAP (slapd) in front of Shiro: refuse anonymous binds server-side (cn=config)
ldapmodify -Y EXTERNAL -H ldapi:/// <<'EOF'
dn: cn=config
changetype: modify
replace: olcDisallows
olcDisallows: bind_anon
EOFWhat not to do: do not rely on the application’s login form refusing blank fields, since the realm is reachable by any client that can submit an authentication token, including the REST paths that skip the form; and do not conclude that Active Directory is safe because anonymous users cannot read the directory by default: the bind itself succeeds on a default domain controller, and that is all the realm asked. The suffix is the cheap, certain fix on the Shiro side.
Sources
- CVE-2026-137686 at CVE.org — the Apache CNA record (27 November 2026): the description, the through-3.0.1 range, the two preconditions, CVSS 4.0 6.3, CWE-287 and the mitigation
- Apache Shiro security reports — the entry for this CVE (Medium, 3.0.2, mitigation, credit to Sungho Park) and the CVE-2014-0074 entry it corrects, which now points at this one
- Apache Shiro 3.0.2 release — released 8 November 2026; the “Security Fixes” section lists the pull requests without CVE ids; the news archive dates the release and the 14 November advisory announcement
- Apache announcement thread — the vendor advisory named in the record; renders as an application shell to automated readers, so its text is quoted here only as the CVE record carries it
- NVD entry — Received; published 27 November; the CNA’s CVSS 4.0 vector and CWE-287;
shiro-corebefore 3.0.2; no NVD score - Distribution trackers: Debian (no package table yet) · Ubuntu (Medium, needs evaluation) · Red Hat (no page; Shiro not shipped)
- CISA KEV catalogue 2026.11.30, not listed · EPSS: 0.00500, 35.9th percentile, on 30 November 2026
Related reading
- CVE-2026-88019: Apache Shiro Jakarta EE form resubmission weakens cookies and can post the form elsewhere — fixed in the same 3.0.2 release
- CVE-2026-74763: Apache Shiro ignores authorisation annotations declared on interfaces and parent classes — the third Shiro fix of 3.0.2
- CVE-2026-123158: OpenSSH password bypass on musl — another authentication check that asked the wrong question
- Life of a login — what a bind proves, what it does not, and where the empty-credential case has bitten before
- Permissions and privilege — what a session for an empty principal can and cannot reach
- Security advisories — every Linux-relevant CVE we track, newest first, with the component index
This advisory page was assembled from the primary sources listed above on 1 December 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.
