CVE-2026-59368
LdapQueryBuilder Silently Discards Existing Filter When Built From Another Query in Spring LDAP
Description
LdapQueryBuilder can lose a search filter that an application expects to be enforced, causing an LDAP search to run with broader criteria than intended.
When a builder is created from an existing query, the filter carried over from that query is not treated as established. A later call that specifies a filter then replaces the carried-over filter instead of being rejected, so the original criteria are dropped without any error. The fix turns this into an IllegalStateException.
Preconditions:
The application derives one LdapQueryBuilder from another query and then specifies a further filter on the derived builder The dropped filter is what restricts the search, for example to a single tenant, organizational unit, or set of entries
When the dropped filter was acting as an authorization boundary, an authenticated user can read directory entries outside the scope the application intended.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.springframework.ldap » spring-ldap-core | >= 3.1.0, <= 3.2.19>= 3.3.0, <= 3.3.9>= 4.0.0, < 4.0.7>= 4.1.0, < 4.1.3 | 4.0.7, 4.1.3 |
Blast radius
61% of the dependent artifacts (236) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 3,247 |
| 2 hops | 3,999 |
| 3 hops | 5,093 |
| 4 hops | 8,400 |
| 5 hops | 246 |
| 6 hops | 345 |
Most used dependents
- com.atlassian.confluence » confluence724 usages
- org.springframework.security » spring-security-ldap457 usages
- com.atlassian.confluence.plugins » confluence-functestrpc-plugin77 usages
- com.atlassian.crowd » crowd-core73 usages
- com.atlassian.crowd » embedded-crowd-core66 usages
- org.dspace » dspace-api43 usages
- com.atlassian.confluence » confluence-acceptance-test39 usages
- com.atlassian.confluence » confluence-test-support-restv238 usages
- com.atlassian.crowd » crowd-ldap38 usages
- org.springframework.boot » spring-boot-starter-data-ldap35 usages
- org.springframework.ldap » spring-ldap-test29 usages
- com.atlassian.bitbucket.server » bitbucket-model29 usages
- com.atlassian.bitbucket.server » bitbucket-platform29 usages
- com.atlassian.bitbucket.server » bitbucket-service-api28 usages
- com.atlassian.confluence » confluence-webapp25 usages
Computed from the dependency graph of build 20261125.0317 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
