CVE-2026-49268: Apache Shiro LDAP DN Injection Vulnerability
HIGHCVE-2026-49268 is a HIGH ldap dn injection vulnerability (CWE-90: Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection')) affecting Apache Shiro libraries in the Maven ecosystem. The issue involves ldap dn injection in defaultldaprealm. Remediation is available by upgrading affected packages to version 2.2.1, 3.0.0-alpha-2.
CVE-2026-49268 at a Glance
How to Fix CVE-2026-49268
To remediate this vulnerability, upgrade all affected Apache Shiro dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>3.0.0-alpha-2</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.shiro
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2026-49268, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.shiro
Analyze the terminal output to locate any version of Apache Shiro in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.1), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.shiro command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-90: Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection'), where the product constructs all or part of an ldap query using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended ldap query when it is sent to a downstream component. In Apache Shiro, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-49268 Affected Apache Shiro Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.shiro:shiro-core
|
Maven |
< 2.2.1
|
2.2.1
|
|
org.apache.shiro:shiro-core
|
Maven |
≥ 3.0.0-alpha-0
< 3.0.0-alpha-2
|
3.0.0-alpha-2
|
References
Frequently Asked Questions
What is CVE-2026-49268?
Which Apache Shiro versions are affected?
What version fixes CVE-2026-49268?
Is shiro-core affected?
What CWE is associated with CVE-2026-49268?
How can I check Maven dependencies for CVE-2026-49268?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x96m-rh44-vgv8",
"modified" : "2026-06-18T14:37:08Z",
"published" : "2026-06-17T18:35:55Z",
"aliases" : [ "CVE-2026-49268" ],
"summary" : "Apache Shiro: LDAP DN Injection in DefaultLdapRealm",
"details" : "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.\n\nThis issue affects all Apache Shiro versions through 2.2.0, and 3.0.0-alpha-1 when using DefaultLdapRealm\nUpgrade to Apache Shiro 2.2.1 or 3.0.0-alpha-2 or later, which fixes the issue.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.shiro:shiro-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.2.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.shiro:shiro-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0-alpha-0"
}, {
"fixed" : "3.0.0-alpha-2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-49268"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/shiro"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/svszql3od8td7hn6conyj2oq70v53b5s"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2026/06/17/8"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-90" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-18T14:37:08Z",
"nvd_published_at" : "2026-06-17T14:17:56Z"
}
}