6.5medium
Denial of Service in python-ldap
- Severity
- 6.5medium CVSS:3.1 by NVD
- Exploit likelihood
- 1.97% (higher than 81% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-qfr5-wjpw-q4c4GHSA-r8wq-qrxc-hmcmPYSEC-2026-912
Description
python-ldap before 3.4.0 is vulnerable to a denial of service when ldap.schema is used for untrusted schema definitions, because of a regular expression denial of service (ReDoS) flaw in the LDAP schema parser. By sending crafted regex input, a remote authenticated attacker could exploit this vulnerability to cause a denial of service condition.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| python-ldap (PyPI) | before 3.4.0 | GitHub Advisory Database, PyPA Advisory Database |
| python-ldap python-ldap | before 3.4.0 | NVD |
All scores
| GitHub | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 4.0medium CVSS:2.0 | AV:N/AC:L/Au:S/C:N/I:N/A:P |
| PyPA Advisory Database | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Classification
What each source says
CVE List
python-ldap before 3.4.0 is vulnerable to a denial of service when ldap.schema is used for untrusted schema definitions, because of a regular expression denial of service (ReDoS) flaw in the LDAP schema parser. By sending crafted regex input, a remote authenticated attacker could exploit this vulnerability to cause a denial of service condition.
GitHub Advisory Database
https://github.com/python-ldap/python-ldap/issues/424
Impact
The LDAP schema parser of python-ldap 3.3.1 and earlier are vulnerable to a regular expression denial-of-service attack. The issue affects clients that use ldap.schema package to parse LDAP schema definitions from an untrusted source.
Patches
The upcoming release of python-ldap 3.4.0 will contain a workaround to prevent ReDoS attacks. The schema parser refuses schema definitions with an excessive amount of backslashes.
Workarounds
As a workaround, users can check input for excessive amount of backslashes in schemas. More than a dozen backslashes per line are atypical.
References
For more information
If you have any questions or comments about this advisory:
- Open an issue in python-ldap tracker
NVD (es)
python-ldap versiones anteriores a 3.4.0, es vulnerable a una denegación de servicio cuando es usado ldap.schema para definiciones de esquemas que no son confiables, debido a un fallo de denegación de servicio de expresiones regulares (ReDoS) en el analizador de esquemas LDAP. Al enviar una entrada regex diseñada, un atacante remoto autenticado podría explotar esta vulnerabilidad para causar una condición de denegación de servicio
References
| https://github.com/python-ldap/python-ldap/security/advisories/GHSA-r8wq-qrxc-hmcm | third-party-advisory, web | |
| https://exchange.xforce.ibmcloud.com/vulnerabilities/221507 | third-party-advisory, vdb-entry, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-46823 | advisory | |
| https://github.com/python-ldap/python-ldap | package | |
| https://github.com/python-ldap/python-ldap/issues/424 | web | |
| https://pypi.org/project/python-ldap | package | |
| https://github.com/advisories/GHSA-qfr5-wjpw-q4c4 | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-46823 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-qfr5-wjpw-q4c4 changed 2026-07-08 | CC-BY-4.0 |
| GitHub Advisory Database | GHSA-r8wq-qrxc-hmcm changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-46823 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-912 changed 2026-07-08 | CC-BY-4.0 |