
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-49268 is an LDAP DN Injection vulnerability in Apache Shiro's DefaultLdapRealm class that allows remote, unauthenticated attackers to bypass authentication or impersonate other users by injecting RFC 2253 special characters into LDAP Distinguished Name (DN) construction. It affects all Apache Shiro versions through 2.2.0 and 3.0.0-alpha-0 through 3.0.0-alpha-1 when DefaultLdapRealm is in use. The vulnerability was reported by zhaokaifei of ChinaTelecom, remediated by Lenny Primak, and publicly disclosed on June 17, 2026 (Apache Advisory, oss-security). It carries a CVSS v3.1 base score of 9.1 (Critical) and a CVSS v4.0 base score of 8.8 (High) (GitHub Advisory).
The root cause is CWE-90 (Improper Neutralization of Special Elements used in an LDAP Query — LDAP Injection): user-supplied username input is directly concatenated into the LDAP DN template within the DefaultLdapRealm class without escaping RFC 2253 special characters (e.g., ,, =, +, <, >, #, ;, \, "). An attacker can craft a malicious username containing these characters to alter the DN structure used during LDAP bind authentication, effectively redirecting the bind to a different directory entry or bypassing credential validation entirely. The attack is network-accessible, requires no authentication or user interaction, and has low complexity — making it automatable at scale (GitHub Advisory, oss-security). No public proof-of-concept code has been identified at this time (Feedly).
Successful exploitation allows an unauthenticated remote attacker to bypass LDAP-based authentication entirely or impersonate arbitrary users within the application, resulting in high integrity impact (unauthorized access and actions as another user) and partial confidentiality impact (access to data scoped to the impersonated account). Availability is not directly affected. In environments where Apache Shiro gates access to sensitive business applications or APIs, a successful authentication bypass could enable lateral movement, privilege escalation, or unauthorized data access across the protected system (GitHub Advisory, Feedly).
DefaultLdapRealm configured for LDAP authentication. This can be done via HTTP response headers, error messages, or dependency scanning tools (e.g., Dependency-Check, Syft).DefaultLdapRealm.,, =, +, \) to manipulate the DN template. For example, if the DN template is uid={0},ou=users,dc=example,dc=com, a username like admin,ou=admins,dc=example,dc=com# could redirect the bind to a different DN.,, =, +, <, >, #, ;, \) in the username field of HTTP POST requests to the application's authentication endpoint.DefaultLdapRealm debug logs (if enabled) showing DN construction with injected characters; Java exceptions related to LDAP DN parsing that are subsequently suppressed or handled.Upgrade to Apache Shiro 2.2.1 (for the 2.x branch) or 3.0.0-alpha-2 (for the 3.x alpha branch), which fix the issue by properly escaping RFC 2253 special characters in LDAP DN construction (Apache Advisory, GitHub Advisory). If immediate patching is not possible, implement server-side input validation to reject or escape RFC 2253 special characters in username fields before they reach the DefaultLdapRealm DN template. Additionally, consider restricting LDAP server permissions to limit the impact of any successful DN manipulation.
The vulnerability was covered by SecurityOnline.info shortly after disclosure, and the advisory was distributed via the Apache announce mailing list and oss-security (oss-security, Apache Announce). The reporter (zhaokaifei, ChinaTelecom) and remediation developer (Lenny Primak) were credited in the official advisory. Community tracking was observed across vulnerability aggregators including VulnDB, CVEFeed, and OSV within hours of disclosure (Feedly).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."