High

Apache Shiro: LDAP DN Injection in DefaultLdapRealm

  • Disclosed: 17.06.2026
  • Updated: 11.10.2026 13:20

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.

PlatformPackageVulnerable versionsFixed 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 score -
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.

All (12) in the archive
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

  1. 2020: 1
  2. 2021: 4
  3. 2022: 3
  4. 2023: 0
  5. 2024: 1
  6. 2025: 0
  7. 2026: 3
Severity:
  1. Apache Shiro: LDAP DN Injection in DefaultLdapRealm this entry
    High CVE-2026-49268 < 2.2.1, >= 3.0.0-alpha-0, < 3.0.0-alpha-2 2.2.1, 3.0.0-alpha-2
  2. Critical · 9.8 CVE-2022-40664 < 1.10.0 1.10.0
  3. Critical · 9.8 CVE-2022-32532 < 1.9.1 1.9.1
  4. Critical · 9.8 Exploited in attacks CVE-2016-4437 < 1.2.5 1.2.5
  5. High · 7.5 CVE-2020-13933 < 1.6.0 1.6.0
  6. Critical · 9.8 CVE-2020-1957 < 1.5.2 1.5.2
  7. Critical · 9.8 CVE-2020-11989 < 1.5.3 1.5.3
  8. High · 7.5 CVE-2019-12422 < 1.4.2 1.4.2

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.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.