{"id":"CVE-2026-44305","aliases":["CVE-2026-44305","GHSA-vr7c-r5gj-j3w5","PYSEC-2026-2590"],"related":[],"kind":"vulnerability","state":"published","title":"Lemur: LDAP TLS certificate verification globally disabled enables credential interception","summary":"Lemur manages TLS certificate creation. Prior to 1.9.0, 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. This vulnerability is fixed in 1.9.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Lemur manages TLS certificate creation. Prior to 1.9.0, 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. This vulnerability is fixed in 1.9.0.","source":"cvelist"},{"lang":"en","text":"## Description\n\n### Overview\n\nWhen 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.\n\n### Vulnerable Code\n\n**Location:** `lemur/auth/ldap.py`, `_bind()` method, line ~172\n\n```python\nif self.ldap_use_tls:\n    ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)\n```\n\nKey issues:\n\n1. `ldap.set_option()` is a **global** call (as opposed to `self.ldap_client.set_option()`), meaning it disables TLS verification for the entire Python process, not just this connection\n2. `OPT_X_TLS_NEVER` means no certificate validation is performed whatsoever — self-signed, expired, wrong hostname, and revoked certificates are all silently accepted\n3. There is no configuration option to override this behavior — TLS verification is always disabled when TLS is enabled\n\n### Impact\n\nA network-positioned attacker (man-in-the-middle) between Lemur and the LDAP server can:\n\n- **Intercept all LDAP credentials** (usernames and plaintext passwords) for every user who authenticates\n- **Modify LDAP responses** to inject arbitrary group memberships, granting admin access\n- **Compromise the entire PKI infrastructure** managed by Lemur, since authentication controls access to certificates and private keys\n\nThis is particularly severe because Lemur is a certificate management system — the tool designed to manage TLS security is itself vulnerable to a TLS attack.\n\n### Steps to Reproduce\n\n1. Deploy Lemur with LDAP TLS enabled:\n   ```python\n   LDAP_AUTH = True\n   LDAP_USE_TLS = True\n   LDAP_BIND_URI = \"ldaps://dc.corp.example.com\"\n   ```\n\n2. Intercept the LDAP connection using a TLS proxy (e.g., `mitmproxy` or `stunnel`):\n   ```bash\n   # Generate a self-signed certificate\n   openssl req -x509 -newkey rsa:2048 -keyout mitm.key -out mitm.crt -days 1 -nodes -subj \"/CN=mitm\"\n\n   # Proxy LDAP traffic\n   stunnel -d 0.0.0.0:636 -r real-ldap-server:636 -p mitm.pem\n   ```\n\n3. Point Lemur's `LDAP_BIND_URI` at the proxy (or perform ARP spoofing/DNS hijacking)\n\n4. Observe that Lemur connects without any certificate verification error\n\n5. All credentials are visible in the proxy's TLS session\n\n### Remediation\n\nRemove the global TLS verification bypass and default to strict verification:\n\n```python\nif self.ldap_use_tls:\n    # Use instance-level option, not global\n    self.ldap_client.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_DEMAND)\n    self.ldap_client.set_option(ldap.OPT_PROTOCOL_VERSION, 3)\n    if self.ldap_cacert_file:\n        self.ldap_client.set_option(ldap.OPT_X_TLS_CACERTFILE, self.ldap_cacert_file)\n```\n\nIf backward compatibility is needed, make it configurable with a secure default:\n\n```python\ntls_require_cert = current_app.config.get(\"LDAP_TLS_REQUIRE_CERT\", ldap.OPT_X_TLS_DEMAND)\nself.ldap_client.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, tls_require_cert)\n```\n\n### Resources\n\n- CWE-295: https://cwe.mitre.org/data/definitions/295.html\n- python-ldap TLS documentation: https://www.python-ldap.org/en/python-ldap-3.4.0/reference/ldap.html#tls-options","format":"markdown","source":"ghsa"},{"lang":"es","text":"Lemur gestiona la creación de certificados TLS. Antes de la versión 1.9.0, cuando TLS LDAP está habilitado (LDAP_USE_TLS = True), el módulo de autenticación LDAP de Lemur deshabilita incondicionalmente la verificación de certificados TLS a nivel del módulo ldap global. Esto permite a un atacante man-in-the-middle posicionado entre Lemur y el servidor LDAP interceptar todas las credenciales de autenticación. Esta vulnerabilidad está corregida en la versión 1.9.0.","source":"nvd"}],"published":"2026-05-06T18:48:12.000Z","modified":"2026-10-26T00:10:00.150Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":6.8,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":6.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":6.8,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":6.8,"rating":"MEDIUM"}],"cwes":["CWE-295"],"affected":[{"ranges":[{"version":"< 1.9.0","status":"affected"}],"vendor":"Netflix","product":"lemur","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.9.0"}],"ecosystem":"PyPI","package":"lemur","purl":"pkg:pypi/lemur","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.9.0"}],"ecosystem":"PyPI","package":"lemur","purl":"pkg:pypi/lemur","source":"pysec"}],"references":[{"url":"https://github.com/Netflix/lemur/security/advisories/GHSA-vr7c-r5gj-j3w5","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44305","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/Netflix/lemur","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://github.com/Netflix/lemur/releases/tag/v1.9.0","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://www.python-ldap.org/en/python-ldap-3.4.0/reference/ldap.html#tls-options","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/lemur","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-vr7c-r5gj-j3w5","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-05-13T14:26:27.895Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-44305","url":"https://www.cve.org/CVERecord?id=CVE-2026-44305","licence":"CVE Terms of Use","modified":"2026-05-13T14:26:51.752Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vr7c-r5gj-j3w5","url":"https://github.com/advisories/GHSA-vr7c-r5gj-j3w5","licence":"CC-BY-4.0","modified":"2026-07-13T16:42:40.355Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-44305","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44305","licence":"Public domain","modified":"2026-10-26T00:10:00.150Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2590","url":"https://osv.dev/vulnerability/PYSEC-2026-2590","licence":"CC-BY-4.0","modified":"2026-07-13T16:32:03.203Z"}],"updatedAt":"2026-11-25T22:59:21.512Z","epss":{"score":0.00143,"percentile":0.03814,"date":"2026-12-01T12:00:22.000Z"}}