CVE-2026-49268: 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.
Published Jun 17, 2026 · Updated Jun 18, 2026
Affected packages
org.apache.shiro:shiro-core
- Ecosystem
- Maven
- Affected
- < 2.2.1
- Fixed in
- 2.2.1
- Check
mvn dependency:tree -Dincludes=org.apache.shiro:shiro-core
org.apache.shiro:shiro-core
- Ecosystem
- Maven
- Affected
- >= 3.0.0-alpha-0, < 3.0.0-alpha-2
- Fixed in
- 3.0.0-alpha-2
- Check
mvn dependency:tree -Dincludes=org.apache.shiro:shiro-core
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Maven vulnerabilities
All Maven entriesCVE-2026-56130
Apache Shiro's "remember me" cookie age is not verified on the server.
low2.0Jun 25, 2026CVE-2026-43827
Apache Shiro has a session fixation vulnerability
medium5.9May 26, 2026CVE-2026-23901
Apache Shiro Affected by an Observable Timing Discrepancy Vulnerability
low1.0Feb 10, 2026CVE-2023-46749
Apache Shiro vulnerable to path traversal
medium6.5Jan 15, 2024
