Apache Software Foundation Apache Shiro
Apache Shiro: LDAP DN Injection in DefaultLdapRealm
A remote attacker can inject LDAP special characters into the Distinguished Name (DN) construction in DefaultLdapRealm class. User-supplied username input is directly concatenated into the LDAP DN template without any escaping of RFC 2253 special characters. This allows an attacker to manipulate the DN structure used for LDAP bind authentication, potentially bypassing authentication or impersonating other users. This issue affects all Apache Shiro versions through 2.2.0, and 3.0.0-alpha-1 when using DefaultLdapRealm Upgrade to Apache Shiro 2.2.1 or 3.0.0-alpha-2 or later, which fixes the issue.
Affected versions and mitigation
From the CVE record, GitHub Security Advisories and the vendor's references.Affected
- <= 2.2.0
- >= 3.0.0-alpha-0, <= 3.0.0-alpha-1
- < 2.2.1
Fixed in 2.2.1
from GitHub Security Advisory GHSA-x96m-rh44-vgv8
- >= 3.0.0-alpha-0, < 3.0.0-alpha-2
Fixed in 3.0.0-alpha-2
from GitHub Security Advisory GHSA-x96m-rh44-vgv8
Mitigation
Upgrade org.apache.shiro:shiro-core to 2.2.1 or later.
Upgrade org.apache.shiro:shiro-core to 3.0.0-alpha-2 or later.
References
- Vendor advisory lists.apache.org/thread/svszql3od8td7hn6conyj2oq70v5…
Timeline
Days relative to CVE publicationPublic PoC known, its date not yet looked up; not in CISA KEV.
PoC repositories
Found on GitHub.1 PoCs · 1 informational · 1 suspicious or fake
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| ncurran/exploits | 12 Apr 2026 −66 d | 0 | PoC older repo: PoC date unknown, not used for the first PoC |
Informational 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| xiaoqiMikko/shiro-check | 6 Aug 2026 +50 d | 0 | Informational · list |
Suspicious or fake 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| sassoftware/shiro | 31 Aug 2026 +75 d | 2 | Suspicious · score 100
Why suspicious
|
Only PoCs count toward the first-PoC date and the characteristics below. Suspicious repositories (score ≥ 50) never count. Do not run PoC code from unknown sources.