CVE-2026-44304: Lemur LDAP Filter Injection Enables Post-authentication Vulnerability
HIGHCVE-2026-44304 is a HIGH (CVSS 8.1) ldap filter injection enables post-authentication vulnerability (CWE-90: Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection')) affecting Lemur libraries in the PyPI ecosystem. The issue involves ldap filter injection enables post-authentication privilege escalation. Remediation is available by upgrading affected packages to version 1.9.0.
CVE-2026-44304 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-44304
To remediate this vulnerability, upgrade all affected Lemur dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install lemur>=1.9.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show lemur
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-44304, inspect your installed packages using pip:
pip show lemur
Analyze the terminal output to locate any version of Lemur in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.0), your application is affected.
Note: The pip show lemur command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-90: Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection'), where the product constructs all or part of an ldap query using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended ldap query when it is sent to a downstream component. In Lemur, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-44304 Affected Lemur Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
lemur
|
PyPI |
< 1.9.0
|
1.9.0
|
References
Frequently Asked Questions
What is CVE-2026-44304?
Which Lemur versions are affected?
What version fixes CVE-2026-44304?
Is lemur affected?
What is the CVSS score of CVE-2026-44304?
What CWE is associated with CVE-2026-44304?
How can I check PyPI dependencies for CVE-2026-44304?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3r34-vq8m-39gh",
"modified" : "2026-05-13T16:41:43Z",
"published" : "2026-05-06T19:16:59Z",
"aliases" : [ "CVE-2026-44304" ],
"summary" : "Lemur: LDAP Filter Injection enables post-authentication privilege escalation",
"details" : "## Description\n\n### Overview\n\nLemur's LDAP authentication module (`lemur/auth/ldap.py`) constructs LDAP search filters using unsanitized user input via Python string interpolation. An authenticated LDAP user can inject LDAP filter metacharacters through the username field to manipulate group membership queries and escalate their privileges to administrator.\n\n### Vulnerable Code\n\n**Location:** `lemur/auth/ldap.py`, `_bind()` method\n\n**Filter 1 — User lookup (line ~161):**\n```python\nldap_filter = \"userPrincipalName=%s\" % self.ldap_principal\n```\n\n`self.ldap_principal` is derived directly from `args[\"username\"]` submitted at `POST /auth/login` with no sanitization. The `ldap.filter.escape_filter_chars()` function is never called.\n\n**Filter 2 — Active Directory group lookup (line ~189):**\n```python\ngroupfilter = \"(&(objectclass=group)(member:1.2.840.113556.1.4.1941:={}))\".format(userdn)\n```\n\nThe `userdn` value is derived from the LDAP response to the first unsanitized query, making it potentially tainted as well.\n\n### Impact\n\nAn authenticated LDAP user can:\n\n1. Inject LDAP filter syntax into the username field during login\n2. Manipulate the group membership query to return arbitrary groups\n3. Be assigned the `admin` role or any other privileged role in Lemur\n4. Gain unauthorized access to all certificates, private keys (via `/certificates/<id>/key`), and CA configurations\n5. Issue certificates under any authority\n\n### Exploitation Constraint\n\nThe `simple_bind_s()` call must succeed before the injectable filter is reached, so the attacker requires valid LDAP credentials. This is a **post-authentication privilege escalation**.\n\n### Steps to Reproduce\n\n1. Deploy Lemur with LDAP authentication enabled:\n ```python\n LDAP_AUTH = True\n LDAP_IS_ACTIVE_DIRECTORY = True\n LDAP_BIND_URI = \"ldaps://dc.corp.example.com\"\n LDAP_BASE_DN = \"DC=corp,DC=example,DC=com\"\n LDAP_EMAIL_DOMAIN = \"corp.example.com\"\n ```\n2. Create a valid LDAP user account\n3. Send login request with crafted username containing LDAP metacharacters:\n ```\n POST /auth/login\n Content-Type: application/json\n\n {\n \"username\": \"validuser)(memberOf=CN=LemurAdmins,DC=corp,DC=example,DC=com\",\n \"password\": \"validpassword\"\n }\n ```\n4. The LDAP filter becomes:\n ```\n userPrincipalName=validuser)(memberOf=CN=LemurAdmins,DC=corp,DC=example,DC=com@corp.example.com\n ```\n5. Depending on the LDAP server's parsing, this can alter query semantics\n6. The user is assigned roles they should not have access to\n\n### Remediation\n\nApply `ldap.filter.escape_filter_chars()` to all user-controlled values before interpolation:\n\n```python\nfrom ldap.filter import escape_filter_chars\n\n# Fix 1: User lookup filter\nldap_filter = \"userPrincipalName=%s\" % escape_filter_chars(self.ldap_principal)\n\n# Fix 2: Active Directory group filter\ngroupfilter = \"(&(objectclass=group)(member:1.2.840.113556.1.4.1941:={}))\".format(\n escape_filter_chars(userdn)\n)\n```\n\n### Resources\n\n- CWE-90: https://cwe.mitre.org/data/definitions/90.html\n- OWASP LDAP Injection: https://owasp.org/www-community/attacks/LDAP_Injection\n- Python ldap.filter.escape_filter_chars: https://www.python-ldap.org/en/python-ldap-3.4.0/reference/ldap-filter.html",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "lemur"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.9.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Netflix/lemur/security/advisories/GHSA-3r34-vq8m-39gh"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44304"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Netflix/lemur"
}, {
"type" : "WEB",
"url" : "https://github.com/Netflix/lemur/releases/tag/v1.9.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-90" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-06T19:16:59Z",
"nvd_published_at" : "2026-05-12T22:16:37Z"
}
}