CVE-2021-46823
Denial of Service in python-ldap
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
6.5
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.
- Record
CVE-2021-46823- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - CVSS 2.0
- 4.0 Medium
AV:N/AC:L/Au:S/C:N/I:N/A:P - Weakness
- CWE-1333
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2021-46823- Updated
- 2026-11-02
EUVDEUVD-2022-6131 No score
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.
- Record
EUVD-2022-6131- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-qfr5-wjpw-q4c4
6.5
Denial of Service in python-ldap
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.
- Record
GHSA-qfr5-wjpw-q4c4- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-r8wq-qrxc-hmcm
6.5
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
For more information
If you have any questions or comments about this advisory:
- Open an issue in python-ldap tracker
- Record
GHSA-r8wq-qrxc-hmcm- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
OSVAZL-9960
6.5
CVE-2021-46823 affecting package python-ldap for versions less than 3.4.0-1
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.
- Record
AZL-9960- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Show 10 moreShow less
OSV
6.5
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.
- Record
CVE-2021-46823- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-46823
6.5
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.
- Record
DEBIAN-CVE-2021-46823- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVGHSA-qfr5-wjpw-q4c4
6.5
Denial of Service in python-ldap
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.
- Record
GHSA-qfr5-wjpw-q4c4- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
OSVGHSA-r8wq-qrxc-hmcm
6.5
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
For more information
If you have any questions or comments about this advisory:
- Open an issue in python-ldap tracker
- Record
GHSA-r8wq-qrxc-hmcm- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
OSVOESA-2022-1792
6.5
python-ldap security update
python-ldap provides an object-oriented API for working with LDAP within Python programs. It allows access to LDAP directory servers by wrapping the OpenLDAP 2.x libraries, and contains modules for other LDAP-related tasks (including processing LDIF, LDAPURLs, LDAPv3 schema, etc.).
Security Fix(es):
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.(CVE-2021-46823)
- Record
OESA-2022-1792- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVOESA-2022-1809
6.5
python-ldap security update
python-ldap provides an object-oriented API for working with LDAP within Python programs. It allows access to LDAP directory servers by wrapping the OpenLDAP 2.x libraries, and contains modules for other LDAP-related tasks (including processing LDIF, LDAPURLs, LDAPv3 schema, etc.).
Security Fix(es):
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.(CVE-2021-46823)
- Record
OESA-2022-1809- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVPYSEC-2026-912
6.5
Denial of Service in python-ldap
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.
- Record
PYSEC-2026-912- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-46823
6.5
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.
- Record
UBUNTU-CVE-2021-46823- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVMGASA-2022-0310 No score
Updated python-ldap packages fix security vulnerability
It was discovered that Python LDAP incorrectly handled certain regular expressions. A remote attacker could possibly use this issue to cause a denial of service (CVE-2021-46823).
- Record
MGASA-2022-0310- Updated
- 2026-11-02
OSVUSN-5508-1 No score
python-ldap vulnerability
It was discovered that Python LDAP incorrectly handled certain regular expressions. An remote attacker could possibly use this issue to cause a denial of service.
- Record
USN-5508-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
python-ldapPyPI |
before 3.4.0 | 3.4.0 |
python-ldapAzure Linux:2 |
before 3.4.0-1 | 3.4.0-1 |
python-ldapDebian:12 |
before 3.4.0-1 | 3.4.0-1 |
python-ldapDebian:13 |
before 3.4.0-1 | 3.4.0-1 |
python-ldapDebian:14 |
before 3.4.0-1 | 3.4.0-1 |
python-ldapPyPI |
before 3.4.0, plus listed versions 2.3.132.4.02.4.12.4.102.4.12 Show 45 moreShow less2.4.132.4.142.4.152.4.162.4.172.4.182.4.192.4.22.4.202.4.212.4.222.4.252.4.262.4.272.4.282.4.292.4.32.4.302.4.312.4.322.4.332.4.352.4.362.4.372.4.382.4.392.4.42.4.402.4.412.4.422.4.432.4.442.4.452.4.52.4.62.4.72.4.82.4.92.5.12.5.23.0.03.0.0b13.0.0b23.0.0b33.0.0b4 |
3.4.0 |
python-ldapMageia:8 |
before 3.3.1-1.1.mga8 | 3.3.1-1.1.mga8 |
python-ldapopenEuler:20.03-LTS-SP1 |
before 3.1.0-4.oe1 | 3.1.0-4.oe1 |
python-ldapopenEuler:22.03-LTS |
before 3.3.1-4.oe2203 | 3.3.1-4.oe2203 |
python-ldapopenEuler:20.03-LTS-SP3 |
before 3.1.0-4.oe1 | 3.1.0-4.oe1 |
python-ldapUbuntu:18.04:LTS |
before 3.0.0-1ubuntu0.2, plus listed versions 2.4.41-12.5.2-13.0.0~b4-13.0.0-13.0.0-1ubuntu0.1 |
3.0.0-1ubuntu0.2 |
python-ldapUbuntu:20.04:LTS |
before 3.2.0-4ubuntu2.1, plus listed versions 3.1.0-2build13.1.0-2build23.2.0-33.2.0-3ubuntu13.2.0-3ubuntu23.2.0-3ubuntu33.2.0-4ubuntu2 |
3.2.0-4ubuntu2.1 |
python-ldapUbuntu:22.04:LTS |
before 3.2.0-4ubuntu7.1, plus listed versions 3.2.0-4ubuntu53.2.0-4ubuntu63.2.0-4ubuntu7 |
3.2.0-4ubuntu7.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-46823 is a medium vulnerability (CVSS 6.5) in Python-ldap, published November 29, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.97%, the 80th percentile. Fixed in python-ldap 3.4.0.
References
github.com/python-ldap/python-ldap/security/advisories/GHSA-r8wq-qrxc-hmcm
exchange.xforce.ibmcloud.com/vulnerabilities/221507
nvd.nist.gov/vuln/detail/CVE-2021-46823
github.com/advisories/GHSA-qfr5-wjpw-q4c4
github.com/python-ldap/python-ldap/issues/424
github.com/advisories/GHSA-r8wq-qrxc-hmcm
Show 10 moreShow less
security-tracker.debian.org/tracker/CVE-2021-46823
github.com/python-ldap/python-ldap
advisories.mageia.org/MGASA-2022-0310.html
bugs.mageia.org/show_bug.cgi?id=30627
ubuntu.com/security/notices/USN-5508-1
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2022-1792
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2022-1809
pypi.org/project/python-ldap
ubuntu.com/security/CVE-2021-46823
cve.org/CVERecord?id=CVE-2021-46823
Left out here: 4 versions. The JSON record has them.