CVE-2026-44304High· 8.1▾ TwilightLemur: LDAP Filter Injection enables post-authentication privilege escalation
▾ Twilight zone — High severity, or a signal on a lesser flaw
impact 44.6 · likelihood 0 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Jul 13.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
Last analysed / modified upstream
0.2%
Lemur'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.
Location: lemur/auth/ldap.py, _bind() method
Filter 1 — User lookup (line ~161):
ldap_filter = "userPrincipalName=%s" % self.ldap_principal
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.
Filter 2 — Active Directory group lookup (line ~189):
groupfilter = "(&(objectclass=group)(member:1.2.840.113556.1.4.1941:={}))".format(userdn)
The userdn value is derived from the LDAP response to the first unsanitized query, making it potentially tainted as well.
An authenticated LDAP user can:
admin role or any other privileged role in Lemur/certificates/<id>/key), and CA configurationsThe 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.
LDAP_AUTH = True
LDAP_IS_ACTIVE_DIRECTORY = True
LDAP_BIND_URI = "ldaps://dc.corp.example.com"
LDAP_BASE_DN = "DC=corp,DC=example,DC=com"
LDAP_EMAIL_DOMAIN = "corp.example.com"
POST /auth/login
Content-Type: application/json
{
"username": "validuser)(memberOf=CN=LemurAdmins,DC=corp,DC=example,DC=com",
"password": "validpassword"
}
userPrincipalName=validuser)(memberOf=CN=LemurAdmins,DC=corp,DC=example,[email protected]
Apply ldap.filter.escape_filter_chars() to all user-controlled values before interpolation:
from ldap.filter import escape_filter_chars
# Fix 1: User lookup filter
ldap_filter = "userPrincipalName=%s" % escape_filter_chars(self.ldap_principal)
# Fix 2: Active Directory group filter
groupfilter = "(&(objectclass=group)(member:1.2.840.113556.1.4.1941:={}))".format(
escape_filter_chars(userdn)
)
lemur < 1.9.0Upgrade to a patched release:
lemur 1.9.0Connected by shared product, vendor, weakness, or advisory.
CVE-2026-44305Medium· 6.8Lemur: LDAP Authentication Globally Disables TLS Certificate Verification When LDAP_USE_TLS Is Enabled
CVE-2015-7764High· 7.5Lemur uses static IV per key
CVE-2023-30797High· 7.5Lemur subject to insecure random generation
CVE-2026-70666High· 7.4Lemur manages TLS certificate creation
CVE-2026-70667Medium· 6.3Lemur manages TLS certificate creation
CVE-2026-71303High· 7.7Lemur manages TLS certificate creation