Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. python-ldap
  4. ›
  5. GMS-2021-11

GMS-2021-11: ReDoS in LDAP schema parser

November 29, 2021

https://github.com/python-ldap/python-ldap/issues/424

Impact

The LDAP schema parser of python-ldap 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 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:

  • Open an issue in python-ldap tracker

References

  • github.com/advisories/GHSA-r8wq-qrxc-hmcm
  • github.com/python-ldap/python-ldap/issues/424
  • github.com/python-ldap/python-ldap/security/advisories/GHSA-r8wq-qrxc-hmcm

Code Behaviors & Features

Detect and mitigate GMS-2021-11 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.4.0

Fixed versions

  • 3.4.0

Solution

Upgrade to version 3.4.0 or above.

Source file

pypi/python-ldap/GMS-2021-11.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:29 +0000.