Description
LDAPCache and LDAPBackingEngine build LDAP search filters for user lookup and role lookup by textually substituting the placeholders %u, %dn, and %fqdn (drawn from the login name, the resolved user DN, and its fully qualified namespace form) into administrator-configured filter templates (userFilter, roleFilter). Before the fix, the only sanitization applied to the substituted value was double backslashed:

filter = filter.replaceAll(Pattern.quote("%u"), Matcher.quoteReplacement(user));

filter = filter.replace("\\", "\\\\");




This does not escape the other characters RFC 4515 requires escaping in an LDAP search filter: *, (, ), and NUL. A login name containing any of these can change the structure of the resulting filter rather than being matched as a literal value (e.g. a crafted username can turn an equality match into a wildcard match, or close/reopen filter clauses), widening what the search returns and potentially causing a login or role lookup to match an LDAP entry other than the intended one, over-granting roles, and depending on deployment-specific filter templates, potentially affecting which account a login resolved to.




It's not exploitable through every entry points: LDAPLoginModule and LDAPPubkeyLoginModule both called Util.doRFC2254Encoding() (correct RFC 4515 escaping) on the login name before handing it to LDAPCache, which masked the missing escaping in LDAPCache for those two call paths. Using LDAPCache directly (bypassing the login modules) does not reproduce through the normal LDAPLoginModule/LDAPPubkeyLoginModule authentication flow for this reason. It does reproduce through two other call paths that reach LDAPCache/LDAPBackingEngine without any prior escaping:

* GSSAPILdapLoginModule passes the NameCallback name straight through, unescaped.
* LDAPBackingEngine (listRoles) passes principal.getName() straight through, unescaped.
Published: 2026-09-28
Score: n/a
EPSS: n/a
KEV: No
Impact: Privilege Escalation through LDAP filter injection
Action: Apply Patch
AI Analysis

Impact

Apache Karaf’s LDAPCache and LDAPBackingEngine create search filters by textual substitution of placeholders %u, %dn, and %fqdn into administrator‑defined templates. The only sanitization performed was doubling backslashes, leaving unescaped LDAP filter meta‑characters such as *, (, ), and NUL. A username containing these characters can alter the structure of the resulting filter, turning an equality comparison into a wildcard or closing an expression prematurely. This can cause a user or role lookup to match unintended LDAP entries, potentially granting unauthorized access or roles.

Affected Systems

The vulnerability exists in Apache Karaf. No specific version range is listed, so all builds that include the affected LDAPCache and LDAPBackingEngine components are potentially impacted. The lack of version detail means users should verify whether their installation includes the mentioned components and apply a fix when available.

Risk and Exploitability

The vulnerability’s severity is not formally scored, but it introduces a high‑impact injection flaw (CWE‑90) that could be leveraged to gain unintended LDAP access. The absence of a KEV listing and lack of publicly disclosed exploits indicate that it is likely not yet abused in the wild, but the mechanism is straightforward and could be weaponized quickly once a patch is unavailable.

Generated by OpenCVE AI on September 28, 2026 at 10:20 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Apache Karaf to the latest release that contains the official fix for LDAP filter injection
  • If an immediate upgrade is not possible, restrict usernames and principal names to alphanumeric characters before they reach LDAPCache or LDAPBackingEngine, and ensure any custom filter templates escape all RFC 4515 meta‑characters
  • Disable GSSAPI LDAP login or remove the GSSAPILdapLoginModule from the authentication configuration if the feature is not required

Generated by OpenCVE AI on September 28, 2026 at 10:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 28 Sep 2026 10:45:00 +0000

Type Values Removed Values Added
First Time appeared Apache
Apache karaf
Vendors & Products Apache
Apache karaf

Mon, 28 Sep 2026 09:45:00 +0000

Type Values Removed Values Added
Description LDAPCache and LDAPBackingEngine build LDAP search filters for user lookup and role lookup by textually substituting the placeholders %u, %dn, and %fqdn (drawn from the login name, the resolved user DN, and its fully qualified namespace form) into administrator-configured filter templates (userFilter, roleFilter). Before the fix, the only sanitization applied to the substituted value was double backslashed: filter = filter.replaceAll(Pattern.quote("%u"), Matcher.quoteReplacement(user)); filter = filter.replace("\\", "\\\\"); This does not escape the other characters RFC 4515 requires escaping in an LDAP search filter: *, (, ), and NUL. A login name containing any of these can change the structure of the resulting filter rather than being matched as a literal value (e.g. a crafted username can turn an equality match into a wildcard match, or close/reopen filter clauses), widening what the search returns and potentially causing a login or role lookup to match an LDAP entry other than the intended one, over-granting roles, and depending on deployment-specific filter templates, potentially affecting which account a login resolved to. It's not exploitable through every entry points: LDAPLoginModule and LDAPPubkeyLoginModule both called Util.doRFC2254Encoding() (correct RFC 4515 escaping) on the login name before handing it to LDAPCache, which masked the missing escaping in LDAPCache for those two call paths. Using LDAPCache directly (bypassing the login modules) does not reproduce through the normal LDAPLoginModule/LDAPPubkeyLoginModule authentication flow for this reason. It does reproduce through two other call paths that reach LDAPCache/LDAPBackingEngine without any prior escaping: * GSSAPILdapLoginModule passes the NameCallback name straight through, unescaped. * LDAPBackingEngine (listRoles) passes principal.getName() straight through, unescaped.
Title Apache Karaf: LDAP filter injection in JAAS LDAP login modules
Weaknesses CWE-90
References

cve-icon MITRE

Status: PUBLISHED

Assigner: apache

Published:

Updated: 2026-09-28T09:34:33.253Z

Reserved: 2026-09-14T13:42:44.229Z

Link: CVE-2026-90979

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-28T10:16:45.990

Modified: 2026-09-28T10:16:45.990

Link: CVE-2026-90979

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-28T10:30:15Z

Weaknesses
  • CWE-90

    Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection')