Skip to main content
Vulnerability Database/CVE-2026-90979

CVE-2026-90979: LDAP Filter Injection Auth Bypass Vulnerability

CVE-2026-90979 is an LDAP filter injection flaw allowing authentication bypass through improper input sanitization. Attackers can craft usernames to manipulate search filters and gain unauthorized access or elevated privileges. This article covers technical details, affected components, exploitation paths, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-90979 Overview

CVE-2026-90979 is an LDAP injection vulnerability [CWE-90] in Apache Karaf's LDAPCache and LDAPBackingEngine components. The flaw stems from inadequate sanitization when substituting %u, %dn, and %fqdn placeholders into administrator-configured userFilter and roleFilter templates. Only backslashes were doubled before the fix, leaving *, (, ), and NUL characters unescaped. An attacker who controls a login name reaching one of the unprotected call paths can alter the structure of the resulting LDAP search filter.

Critical Impact

A crafted login name can convert an equality match into a wildcard match or close and reopen filter clauses, causing authentication or role lookups to resolve to unintended LDAP entries and potentially over-granting roles.

Affected Products

  • Apache Karaf — LDAPCache component
  • Apache Karaf — LDAPBackingEngine component (listRoles path)
  • Apache Karaf — GSSAPILdapLoginModule authentication path

Discovery Timeline

  • 2026-09-28 - CVE-2026-90979 published to NVD
  • 2026-09-30 - Last updated in NVD database

Technical Details for CVE-2026-90979

Vulnerability Analysis

LDAPCache and LDAPBackingEngine build LDAP search filters by textually substituting user-controlled values into filter templates. The pre-fix code applied only a backslash doubling step after replacing the %u placeholder:

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

RFC 4515 requires escaping *, (, ), and NUL within LDAP search filter assertion values. Because those characters pass through unmodified, a crafted login name can inject filter syntax rather than being matched as a literal string.

Root Cause

The root cause is incomplete input encoding before concatenation into a query language, which maps directly to [CWE-90] LDAP Injection. The developers assumed callers would pre-encode supplied values. That assumption held for LDAPLoginModule and LDAPPubkeyLoginModule, which both invoke Util.doRFC2254Encoding() on the login name before handing it to LDAPCache. The encoding call masked the missing escaping in the cache layer for those two authentication paths.

Attack Vector

Two call paths reach LDAPCache or LDAPBackingEngine without any prior escaping. GSSAPILdapLoginModule forwards the NameCallback name directly, unescaped. LDAPBackingEngine.listRoles passes principal.getName() through without encoding. An attacker supplying a username containing * can broaden an equality match into a wildcard, matching more LDAP entries than intended. Supplying ( or ) can close an existing filter clause and open a new one, changing the overall semantics of the search. Depending on deployment-specific filter templates, this can affect which account a login resolves to and which roles are returned.

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-90979

Indicators of Compromise

  • LDAP server query logs containing filter expressions with unescaped *, (, or ) characters inside the position where the %u, %dn, or %fqdn placeholder is substituted.
  • Authentication events for Kerberos or GSSAPI principals whose names contain LDAP metacharacters.
  • Role lookups via LDAPBackingEngine.listRoles returning unexpectedly broad result sets or roles not aligned with the requesting principal.

Detection Strategies

  • Inspect LDAP directory audit logs for search filters whose structure deviates from the configured userFilter or roleFilter template.
  • Correlate Karaf authentication logs with directory-side search filters to detect anomalies between the submitted username and the executed filter.
  • Flag any login or role lookup where the principal name contains *, (, ), \, or NUL bytes.

Monitoring Recommendations

  • Enable verbose LDAP query logging on the directory server during triage to capture the exact filter strings issued by Karaf.
  • Monitor the GSSAPILdapLoginModule and LDAPBackingEngine code paths for abnormal invocation frequency or principal name patterns.
  • Alert on role assignment changes that occur outside of normal administrative workflows.

How to Mitigate CVE-2026-90979

Immediate Actions Required

  • Upgrade Apache Karaf to a version containing the fix referenced in the Apache Karaf CVE-2026-90979 Advisory.
  • Audit all configured userFilter and roleFilter templates to confirm placeholders are only substituted with values the application fully controls.
  • Review access logs for prior role lookups or authentications that may have resolved to unintended LDAP entries.

Patch Information

Apache Karaf has published a security advisory describing the fix, which adds proper RFC 4515 escaping within LDAPCache and LDAPBackingEngine so sanitization no longer depends on callers. Refer to the Apache Karaf CVE-2026-90979 Advisory and the Openwall OSS-Security Discussion for version details and remediation guidance.

Workarounds

  • If GSSAPILdapLoginModule is not required, disable it to remove one of the unescaped call paths.
  • Restrict directory service accounts used by Karaf to the minimum required search base and role scope, limiting what a broadened filter can return.
  • Enforce upstream validation that rejects principal names containing *, (, ), \, or NUL before they reach Karaf authentication modules.
bash
# Example upstream validation at a reverse proxy or SSO layer
# Reject usernames containing LDAP metacharacters before they reach Karaf
if [[ "$USERNAME" =~ [\*\(\)\\] ]]; then
  echo "Invalid username" >&2
  exit 1
fi

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.