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: 7.3 High
EPSS: < 1% Very Low
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 has a CVSS score of 7.3, indicating a high severity. This high‑impact injection flaw (CWE‑90) could be leveraged to gain unintended LDAP access. The EPSS score is below 1%, suggesting low but nonzero exploitation probability. The vulnerability is not listed in the CISA KEV catalog. The absence of publicly disclosed exploits indicates 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 October 1, 2026 at 01:34 UTC.

Remediation

No solution or workaround provided in the CVE record.

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 October 1, 2026 at 01:34 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 08 Oct 2026 19:30:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:apache:karaf:*:*:*:*:*:*:*:*

Wed, 30 Sep 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 28 Sep 2026 14:30:00 +0000

Type Values Removed Values Added
References

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-30T19:53:57.685Z

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

Link: CVE-2026-90979

cve-icon Vulnrichment

Updated: 2026-09-28T13:10:12.005Z

cve-icon NVD

Status : Analyzed

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

Modified: 2026-10-08T19:20:23.823

Link: CVE-2026-90979

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-01T01:45:16Z

Weaknesses
  • CWE-90

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