# CVE-2026-49268: Apache Shiro LDAP injection in DefaultLdapRealm

Source: https://junglewise.ai/threats/cve-2026-49268-apache-shiro-ldap-injection-in-defaultldaprealm  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-17. Updated: 2026-06-20  
License: CC BY 4.0 with a link back

CVE-2026-49268 · Severity: critical · CVSS 9.1 · Published 2026-06-17

Apache Shiro, a widely used security framework for Java applications, contains a vulnerability in its LDAP authentication component. An attacker can use specially crafted usernames to manipulate how the system identifies users during login. This could allow an unauthorized person to bypass security checks or log in as a different user, potentially gaining access to sensitive data or administrative functions.

Technologies: [org.apache.shiro:shiro-core (Maven)](https://junglewise.ai/threats/technologies/org-apache-shiro-shiro-core). Vendors: [Maven](https://junglewise.ai/threats/vendors/maven).

## Quick answers

**Is CVE-2026-49268 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-49268 being exploited in the wild.

**How severe is CVE-2026-49268?** Critical severity, with a CVSS score of 9.1, published 17 June 2026.

**Which products and versions are affected?** org.apache.shiro:shiro-core (Maven) ECOSYSTEM:introduced=0,fixed=2.2.1.

**Is there a fix for CVE-2026-49268?** Yes. org.apache.shiro:shiro-core (Maven): upgrade to 2.2.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-49268 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-49268?** Check whether you run org.apache.shiro:shiro-core (Maven) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- org.apache.shiro:shiro-core (Maven): upgrade to 2.2.1 or later

  ```sh
  # set org.apache.shiro:shiro-core to 2.2.1 in your pom.xml or build.gradle
  ```


## Technical details

An LDAP injection vulnerability exists in Apache Shiro's DefaultLdapRealm class. The vulnerability is caused by the direct concatenation of user-supplied username input into the LDAP Distinguished Name (DN) template without proper escaping of RFC 2253 special characters. A remote, unauthenticated attacker can exploit this by providing a malicious username containing LDAP special characters to manipulate the DN structure used for LDAP bind authentication. Successful exploitation can result in authentication bypass or the ability to impersonate other users. The issue is fixed in Apache Shiro versions 2.2.1 and 3.0.0-alpha-2.

## Affected products

- Apache Shiro <= 2.2.0, 3.0.0-alpha-1

## Identifiers

- CVE-2026-49268
- GHSA-x96m-rh44-vgv8

## Timeline

- 2026-06-17: disclosed
- 2026-06-17: advisory

## References

- [https://repo.maven.apache.org/maven2](https://repo.maven.apache.org/maven2)
- [https://lists.apache.org/thread/svszql3od8td7hn6conyj2oq70v53b5s](https://lists.apache.org/thread/svszql3od8td7hn6conyj2oq70v53b5s)
- [http://www.openwall.com/lists/oss-security/2026/06/17/8](http://www.openwall.com/lists/oss-security/2026/06/17/8)

## Related threats

- [Apache Shiro authentication bypass via RememberMe cookie replay](https://junglewise.ai/threats/cve-2026-56130-apache-shiro-authentication-bypass-via-rememberme-cookie-replay)
- [Apache Shiro session fixation in default configuration](https://junglewise.ai/threats/cve-2026-43827-apache-shiro-session-fixation-in-default-configuration)
- [Apache Shiro Affected by an Observable Timing Discrepancy Vulnerability](https://junglewise.ai/threats/cve-2026-23901-apache-shiro-affected-by-an-observable-timing-discrepancy)
- [Apache Shiro vulnerable to path traversal](https://junglewise.ai/threats/cve-2023-46749-apache-shiro-vulnerable-to-path-traversal)
- [Apache Shiro Authentication Bypass vulnerability](https://junglewise.ai/threats/cve-2022-40664-apache-shiro-authentication-bypass-vulnerability)
