LDAP Injection in Apache Shiro
CVE-2026-49268
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.
Published · last modified .
CVSS v3 metric
CVSS v3 base score 9.1 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
EPSS exploit prediction
EPSS 0.005, 44.2th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Apache Shiro — versions 3.0.0
- Apache Software Foundation Shiro — versions 0, 3.0.0-alpha-0
Weakness classification (CWE)
Public exploits and proof-of-concept code
2 public repositories with exploit or proof-of-concept code for this CVE:
- sassoftware/shiro (2 stars, last pushed 2026-09-09): CVE-2026-49268 — Analysis and Remediation of an LDAP Injection Authentication Bypass Vulnerability
- xiaoqiMikko/shiro-check (last pushed 2026-09-09): 扫出你实际装的 Apache Shiro 模块与版本,逐条判定官方 26 条 CVE 里哪些真的落在你身上。按「CVE × 模块」判定,零依赖单 jar。 CVE-2026-49268
References
- lists.apache.org/thread/svszql3od8td7hn6conyj2oq70v53b5s (vendor-advisory, Mailing List, Vendor Advisory)
- www.openwall.com/lists/oss-security/2026/06/17/8 (Third Party Advisory)
This CVE has public exploit evidence. See the latest CVEs with public exploits.