🛡️ CVE-2021-46823 — python-ldap
Description
ReDoS in LDAP schema parser
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](https://cwe.mitre.org/data/definitions/1333.html)
For more information
If you have any questions or comments about this advisory:
- Open an issue in [python-ldap](https://github.com/python-ldap/python-ldap) tracker
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity none, availability high.
Weakness class
CVE-2021-46823 is classified as CWE-1333: Inefficient Regular Expression Complexity. A regular expression backtracks catastrophically on crafted input, consuming CPU out of proportion to input size.
Affected software
CVE-2021-46823 is recorded against 1 package.
- python-ldap (fixed in 3.4.0)
Timeline and source
Published on 19 June 2022 and last revised on 8 July 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.
References
github.com (Web)
nvd.nist.gov (Advisory)
exchange.xforce.ibmcloud.com (Web)
github.com (Package)
CVE-2021-46823 on other distributions
Each distribution ships its own build and its own fixed version. Pick the one you run:
Details
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| python-ldap | — | 3.4.0 |
References
Similar Threats
- Medium OESA-2025-2681
- Medium OESA-2025-2682
- Medium OESA-2025-2683
- Medium OESA-2025-2684
- Medium OESA-2025-2685
More CVE 2021 advisories
Browse all of CVE 2021 in the advisory index.
Free Vulnerability Check
Is your site affected by CVE-2021-46823?
BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against CVE-2021-46823 and other known CVE records.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.