cve.bz

CVE-2021-46823 python-ldap python-ldap

6.5 mediumEPSS 2.0%Fix available

Medium (6.5) in python-ldap python-ldap. EPSS 2.0% estimated probability of exploitation activity in the next 30 days. Fixed in python-ldap 3.4.0.

On this page
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.

Severity

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
EPSS
2.0% (unchanged from 2.0% a week ago; 1.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 81st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-1333 Inefficient Regular Expression Complexity
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-46823 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-46823?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-46823?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-46823 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
python-ldap:python-ldapbefore 3.4.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-qfr5-wjpw-q4c4PyPIpython-ldap<3.4.03.4.0
GHSA-r8wq-qrxc-hmcmPyPIpython-ldap<3.4.03.4.0
PYSEC-2026-912PyPIpython-ldap<3.4.03.4.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14python-ldap3.4.0-1DEBIAN-CVE-2021-46823
Ubuntu18.04:LTSpython-ldap3.0.0-1ubuntu0.2UBUNTU-CVE-2021-46823 USN-5508-1
Ubuntu20.04:LTSpython-ldap3.2.0-4ubuntu2.1UBUNTU-CVE-2021-46823 USN-5508-1
Ubuntu22.04:LTSpython-ldap3.2.0-4ubuntu7.1UBUNTU-CVE-2021-46823 USN-5508-1
Azure Linux2python-ldap3.4.0-1AZL-9960

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat Enterprise Linux 9.0.z is affected by this vulnerability as it includes the vulnerable version of python-ldap (3.3.1). However, the issue was resolved in Red Hat Enterprise Linux 9.2 and later via RHEA-2023:2359, which rebased python-ldap to version 3.4.3 containing the upstream fix. Red Hat Enterprise Linux 10 is not affected, as it does not ship the vulnerable code.

Red Hat's mitigation

Check input for an excessive amount of backslashes in schemas. More than a dozen backslashes per line are atypical.

ProductPackageStateAdvisory
Red Hat Ansible Automation Platform 1.2python-ldapWill not fix
Red Hat Ansible Tower 3python-ldapWill not fix
Red Hat Enterprise Linux 6python-ldapOut of support scope
Red Hat Enterprise Linux 7python-ldapOut of support scope
Red Hat Enterprise Linux 8python-ldapWill not fix
Red Hat Enterprise Linux 9python-ldapWill not fix
Red Hat OpenStack Platform 13 (Queens)python-ldap3Out of support scope
Red Hat OpenStack Platform 16.1python-ldap3Not affected
Red Hat OpenStack Platform 16.2python-ldap3Not affected
Red Hat Quay 3quay/quay-rhel8Affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-46823.

Attack patterns (CAPEC)

  • CAPEC-492 Regular Expression Exponential Blowup

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON