CVE-2026-44305: Lemur: LDAP Authentication Globally Disables TLS Certificate Verification When LDAP_USE_TLS Is Enabled
Description Overview When LDAP TLS is enabled (LDAPUSETLS = True), Lemur's LDAP authentication module unconditionally disables TLS certificate verification at the global ldap module level. This allows a man-in-the-middle attacker positioned between Lemur and the LDAP server to intercept all authentication credentials. Vulnerable Code Location: lemur/auth/ldap.py, bind() method, line ~172 Key issues: 1.
Published May 6, 2026 · Updated May 13, 2026
Affected packages
lemur
- Ecosystem
- PyPI
- Affected
- < 1.9.0
- Fixed in
- 1.9.0
- Check
pip show lemur
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Description
Overview
When LDAP TLS is enabled (LDAP_USE_TLS = True), Lemur's LDAP authentication module unconditionally disables TLS certificate verification at the global ldap module level. This allows a man-in-the-middle attacker positioned between Lemur and the LDAP server to intercept all authentication credentials.
Vulnerable Code
Location: lemur/auth/ldap.py, _bind() method, line ~172
if self.ldap_use_tls:
ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)Key issues:
ldap.set_option()is a global call (as opposed toself.ldap_client.set_option()), meaning it disables TLS verification for the entire Python process, not just this connectionOPT_X_TLS_NEVERmeans no certificate validation is performed whatsoever — self-signed, expired, wrong hostname, and revoked certificates are all silently accepted- There is no configuration option to override this behavior — TLS verification is always disabled when TLS is enabled
Impact
A network-positioned attacker (man-in-the-middle) between Lemur and the LDAP server can:
- Intercept all LDAP credentials (usernames and plaintext passwords) for every user who authenticates
- Modify LDAP responses to inject arbitrary group memberships, granting admin access
- Compromise the entire PKI infrastructure managed by Lemur, since authentication controls access to certificates and private keys
This is particularly severe because Lemur is a certificate management system — the tool designed to manage TLS security is itself vulnerable to a TLS attack.
Steps to Reproduce
- Deploy Lemur with LDAP TLS enabled: ``
python LDAP_AUTH = True LDAP_USE_TLS = True LDAP_BIND_URI = "ldaps://dc.corp.example.com"``
- Intercept the LDAP connection using a TLS proxy (e.g.,
mitmproxyorstunnel): ```bash # Generate a self-signed certificate openssl req -x509 -newkey rsa:2048 -keyout mitm.key -out mitm.crt -days 1 -nodes -subj "/CN=mitm"
Proxy LDAP traffic
stunnel -d 0.0.0.0:636 -r real-ldap-server:636 -p mitm.pem
3. Point Lemur's `LDAP_BIND_URI` at the proxy (or perform ARP spoofing/DNS hijacking)
4. Observe that Lemur connects without any certificate verification error
5. All credentials are visible in the proxy's TLS session
### Remediation
Remove the global TLS verification bypass and default to strict verification:
if self.ldap_use_tls:
Use instance-level option, not global
self.ldap_client.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_DEMAND) self.ldap_client.set_option(ldap.OPT_PROTOCOL_VERSION, 3) if self.ldap_cacert_file: self.ldap_client.set_option(ldap.OPT_X_TLS_CACERTFILE, self.ldap_cacert_file)
If backward compatibility is needed, make it configurable with a secure default:
tls_require_cert = current_app.config.get("LDAP_TLS_REQUIRE_CERT", ldap.OPT_X_TLS_DEMAND) self.ldap_client.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, tls_require_cert)
### Resources
- CWE-295: https://cwe.mitre.org/data/definitions/295.html
- python-ldap TLS documentation: https://www.python-ldap.org/en/python-ldap-3.4.0/reference/ldap.html#tls-optionsCredited to kuranikaran.
References
- https://github.com/Netflix/lemur/security/advisories/GHSA-vr7c-r5gj-j3w5
- https://github.com/Netflix/lemur/releases/tag/v1.9.0
- https://www.python-ldap.org/en/python-ldap-3.4.0/reference/ldap.html#tls-options
- https://nvd.nist.gov/vuln/detail/CVE-2026-44305
- https://github.com/advisories/GHSA-vr7c-r5gj-j3w5
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-70666
Lemur: Server-Side Request Forgery via the ACME client following server-controlled URLs
high7.4Aug 18, 2026CVE-2026-70667
Lemur: SSRF protection in certificate revocation checking bypassable via HTTP redirects and DNS rebinding (incomplete fix for GHSA-54vg-pfh7-jq95)
medium6.3Aug 18, 2026CVE-2026-71303
Lemur: Incomplete fix for GHSA-v2wp-frmc-5q3v -- ACME authority update endpoint allows non-admin to replace `acme_url` with internal IP, bypassing allowlist
high7.7Aug 18, 2026CVE-2026-71307
Lemur: Authenticated low-privilege users can read plaintext destination credentials (SFTP password / private-key passphrase) via the destinations API
high7.7Aug 18, 2026CVE-2026-71308
Lemur: Unchecked `replaces[]` lets any user silence notifications and hijack auto-rotation for arbitrary certificates
high8.1Aug 18, 2026CVE-2026-71317
Lemur: Sub-CA creation never checks `AuthorityPermission` on the parent authority
medium6.5Aug 18, 2026
