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 software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Java / Kotlin (Maven) | org.apache.shiro:shiro-core | < 2.2.1, >= 3.0.0-alpha-0, < 3.0.0-alpha-2 | 2.2.1, 3.0.0-alpha-2 |
References
- CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N/S:P/AU:Y/R:A/RE:L/U:Red- Weakness (CWE)
CWE-90- Platform
- Java / Kotlin (Maven)
- Package
org.apache.shiro:shiro-core- Disclosed
- 17.06.2026
- Updated
- 11.10.2026 13:20
Sources and licenses
OSV / GitHub Advisory Database - GHSA-x96m-rh44-vgv8 - CC BY 4.0
Vulnerability history: org.apache.shiro:shiro-core
All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 12
- First → latest
- 02.2020 06.2026
- Without a fix
- 0
- Exploited in attacks
- 1
Severity breakdown
- Critical 6
- High 3
- Medium 2
- Low 1
Disclosures per year
- 2020: 1
- 2021: 4
- 2022: 3
- 2023: 0
- 2024: 1
- 2025: 0
- 2026: 3
-
Apache Shiro: LDAP DN Injection in DefaultLdapRealm this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.