CVE-2021-46823
JSON

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 packageVersionsReported by
Unspecified productn/aCVE List
python-ldap (PyPI)before 3.4.0GitHub Advisory Database, PyPA Advisory Database
python-ldap python-ldapbefore 3.4.0NVD

All scores

GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD4.0medium CVSS:2.0AV:N/AC:L/Au:S/C:N/I:N/A:P
PyPA Advisory Database6.5medium CVSS:3.1CVSS: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

CWE-1333

For more information

If you have any questions or comments about this advisory:

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

Sources

SourceRecordLicence
CVE ListCVE-2021-46823 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-qfr5-wjpw-q4c4 changed 2026-07-08CC-BY-4.0
GitHub Advisory DatabaseGHSA-r8wq-qrxc-hmcm changed 2026-07-08CC-BY-4.0
NVDCVE-2021-46823 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-912 changed 2026-07-08CC-BY-4.0