Get ahead
VMware offers training and certification to turbo-charge your progress.
Learn moreLdapQueryBuilder 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:
LdapQueryBuilder from another query and then specifies a further filter on the derived builderWhen the dropped filter was acting as an authorization boundary, an authenticated user can read directory entries outside the scope the application intended.
Spring LDAP:
| Fix version | Availability |
|---|---|
| 4.1.3 | OSS |
| 4.1.2.1 | Enterprise Support Only |
| 4.0.7 | OSS |
| 4.0.6.1 | Enterprise Support Only |
| 3.3.10 | Enterprise Support Only |
| 3.2.20 | Enterprise Support Only |
In the fixed versions, a builder created with LdapQueryBuilder.fromQuery(LdapQuery) rejects a subsequent filter specification with an IllegalStateException instead of silently replacing the filter it was seeded with. fromQuery(LdapQuery) is also deprecated in favor of the new LdapQueryBuilder.withQuery(LdapQuery), which copies everything from the source query except its filter.
Applications that specify a new filter on a builder derived from another query should switch to withQuery(LdapQuery). Applications that want to keep the source query's filter should pass it explicitly to the new builder.
To report a security vulnerability for a project within the Spring portfolio, see the Security Policy