CVEfocus › CVE database › CVE-2025-61911

CVE-2025-61911python-ldap has sanitization bypass in ldap.filter.escape_filter_chars

CVSS 5.5 MediumEPSS 0.5% (higher than 36% of CVEs)Published 2025-10-10Updated 2025-10-14Assigner: GitHub_M

python-ldap is a lightweight directory access protocol (LDAP) client API for Python. In versions prior to 3.4.5, the sanitization method `ldap.filter.escape_filter_chars` can be tricked to skip escaping of special characters when a crafted `list` or `dict` is supplied as the `assertion_value` parameter, and the non-default `escape_mode=1` is configured. The method `ldap.filter.escape_filter_chars` supports 3 different escaping modes. `escape_mode=0` (default) and `escape_mode=2` happen to raise exceptions when a `list` or `dict` object is supplied as the `assertion_value` parameter. However, `escape_mode=1` computes without performing adequate logic to ensure a fully escaped return value. If an application relies on the vulnerable method in the `python-ldap` library to escape untrusted user input, an attacker might be able to abuse the vulnerability to launch ldap injection attacks which could potentially disclose or manipulate ldap data meant to be inaccessible to them. Version 3.4.5 fixes the issue by adding a type check at the start of the `ldap.filter.escape_filter_chars` method to raise an exception when the supplied `assertion_value` parameter is not of type `str`.

CWE-75CWE-843

What to do

Fixed builds are available from Alpine, Debian, PyPI, Ubuntu: see the table below for the fixed version per release.

Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

8Fixed
5Fix pending
3Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 25.10python-ldapFixed3.4.4-1ubuntu0.25.10.1UBUNTU-CVE-2025-61911
Ubuntu 24.04python-ldapFixed3.4.4-1ubuntu0.24.04.1UBUNTU-CVE-2025-61911
Ubuntu 22.04python-ldapFixed3.2.0-4ubuntu7.2UBUNTU-CVE-2025-61911
Ubuntu 20.04python-ldapFix pending3.2.0-4ubuntu2.1+esm1 (Ubuntu Pro)UBUNTU-CVE-2025-61911
Ubuntu 18.04python-ldapFix pending3.0.0-1ubuntu0.2+esm1 (Ubuntu Pro)UBUNTU-CVE-2025-61911
Ubuntu 16.04python-ldapFix pending2.4.22-0.1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2025-61911
Debian 14python-ldapFixed3.4.5-1DEBIAN-CVE-2025-61911
Debian 13python-ldapFixed3.4.4-1+deb13u1DEBIAN-CVE-2025-61911
Debian 12python-ldapFixed3.4.3-2+deb12u1DEBIAN-CVE-2025-61911
Red Hat Enterprise Linux 10python3-ldapFix pending
Fix deferred
Red Hat Enterprise Linux 9python3-ldapFix pending
Fix deferred
Red Hat Enterprise Linux 8python3-ldapWill not fix
Out of support scope
Red Hat Enterprise Linux 7python-ldapWill not fix
Out of support scope
Red Hat Enterprise Linux 6python-ldapWill not fix
Out of support scope
Alpine Linux 3.24py3-ldapFixed3.4.5-r0ALPINE-CVE-2025-61911
PyPI librarypython-ldapFixed3.4.5PYSEC-2026-1847

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.