/

CVE-2026-44304

Severity:

HIGH RISK

(8.1)

LDAP Injection in Lemur LDAP Authentication Module

CVE-2026-44304

Deferred

Vulnerability type

Category:

LDAP Injection

CWE:

CWE-90

Impact:

Privilege Escalation via LDAP Query Manipulation

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Lemur's LDAP authentication module constructs LDAP search filters using unsanitized user input, allowing an authenticated LDAP user to inject LDAP filter metacharacters into the username field.

Under these conditions, an attacker can manipulate group membership queries and potentially escalate their privileges to administrator within Lemur.

Affected context

This vulnerability arises in deployments of Lemur that use the LDAP authentication backend and rely on LDAP group membership for role or privilege assignment.

It specifically affects code paths where LDAP search filters are built using Python string interpolation with user-controlled usernames.

The risk is most pronounced in environments where administrative or elevated roles are granted based on LDAP group membership without additional verification.

Exploit preconditions

  • Attack surface: Lemur login or authentication endpoints that accept usernames for LDAP authentication.
  • Required access: The attacker must be a valid LDAP user or at least able to reach the LDAP-backed authentication flow with a controllable username field.
  • Trigger point: Submission of a crafted username that introduces LDAP filter metacharacters into the search filter used for group membership checks.
  • Why exploitation is possible: The LDAP search filter is constructed via raw string interpolation without escaping or canonicalizing user-supplied values, allowing arbitrary modification of the resulting filter logic.

Why this happens

The root cause is the construction of LDAP search filters using unvalidated and unescaped user input within string interpolation.

This maps directly to CWE-90: Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection'), where special characters such as *, (, ), and logical operators are not neutralized or encoded before being inserted into filter expressions.

As a result, an attacker can alter the logical structure of the query, influencing which entries or groups are matched and thereby subverting authorization decisions.

Potential impact

  • An authenticated LDAP user could escalate their privileges to administrator within Lemur.
  • Attackers may cause Lemur to treat them as a member of privileged groups despite not being so in the directory.
  • Misclassification of user roles, leading to unauthorized access to certificate management, key material, or administrative functions.
  • Broader compromise of certificate issuance workflows, including potential issuance or revocation of certificates outside established policies.

General mitigation guidance

Effective mitigation focuses on treating LDAP filters as structured queries and never composing them with raw user input.

Common defensive patterns include:

  • Using LDAP client library APIs that accept separate filter templates and parameter values, relying on the library to perform correct escaping and encoding.
  • Applying strict input validation on usernames and other LDAP-bound fields, limiting acceptable characters and rejecting unexpected metacharacters.
  • Centralizing and reusing safe filter construction helpers to avoid ad hoc string interpolation in authentication and authorization code.
  • Enforcing defense-in-depth by ensuring that administrative roles or high-privilege actions require additional verification beyond simple group membership checks, such as explicit assignment or secondary approval.

How teams detect issues like this

Organizations can detect this class of issue through a combination of code-level and operational techniques:

  • Static analysis rules that flag string concatenation or interpolation used to build LDAP filters, especially in authentication or authorization modules.
  • Code review checklists that explicitly call out LDAP query construction and require demonstrated use of safe filter-building APIs or escaping functions.
  • Security linters or custom scripts that search for direct usage of LDAP filter strings containing placeholders, format operations, or f-strings with user-controlled variables.
  • Runtime monitoring for unusual authentication patterns, such as users not expected to be administrators suddenly appearing with elevated roles, which may indicate LDAP query manipulation.

Sources

SourceLink
github.comgithub.com/Netflix/lemur/security/advisories/GHSA-3r34-vq8m-39gh

Frequently asked

questions

It is remotely exploitable in the sense that it can be triggered over the network through Lemur's authentication interface, as long as the attacker can interact with the LDAP-backed login flow.

In typical deployments, the attacker needs to be an authenticated LDAP user or at least able to submit usernames through the authentication endpoint.

The attack relies on controlling the username field that is later used in group membership queries.

The safest pattern is to avoid constructing LDAP filters with raw string operations and instead pass user input as parameters to library routines that handle escaping and encoding.

Additionally, input validation should restrict usernames to a minimal, well-defined set of characters and reject anything containing LDAP metacharacters.

Adopt a standardized LDAP access layer that encapsulates filter construction with safe APIs, enforce secure coding guidelines that prohibit direct filter string interpolation, and integrate static analysis or code review checks focused on query-building code paths.

Combining these measures with principle-of-least-privilege role design reduces the impact even if a filter-related bug slips through.

Find out what's already
exploitable in your codebase.