CVE-2025-61911: python-ldap
Vulnerability summary
CVE-2025-61911 is a medium (CVSS 6.5) vulnerability in python-ldap. EPSS estimates a 0.32% chance of exploitation in the next 30 days, higher than 23.7% of scored vulnerabilities. 1 public exploit is recorded.
Advisory lineage
Upstream 0 · Downstream 6 · Related 8Timeline
- 10-10-2025PublishedVulnerability first disclosed.
- 14-10-2025Last modifiedVulnerability information updated.
Description
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`.
CVSS metrics
8 scores · 6 sources · 2 versions- OSV · PypiEcosystem advisory · calculated6.9MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:PDiffers
- OSV · UbuntuEcosystem advisory · calculated6.9MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:PDiffers
- OSV · ChainguardEcosystem advisory · calculated6.9MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:PDiffers
- NVDNIST5.5MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · UbuntuEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
- OSV · DebianEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
EPSS trend
Probability
0.32%
Chance of exploitation in the next 30 days
Percentile
24%
Versus all other CVEs
30-day change
0.00 pp
From 0.32% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundPython Ldap
Maturity: poc
Weaknesses
CWE · root cause- CWE-75Failure to Sanitize Special Elements into a Different Plane (Special Element Injection)The product does not adequately filter user-controlled input for special elements with control implications.
- CWE-843Access of Resource Using Incompatible Type ('Type Confusion')The product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.
Affected systems
Chainguard1 product
- awx< 24.6.1-r18
Debian1 product
- python-ldap< 3.4.3-2+deb12u1 | < 3.4.4-1+deb13u1 | < 3.4.5-1
PyPI1 product
- python-ldap< 3.4.5
Python-ldap1 product
- python-ldap< 3.4.5
Ubuntu1 product
- python-ldap< 2.4.22-0.1ubuntu0.1~esm1 | < 3.0.0-1ubuntu0.2+esm1 | < 3.2.0-4ubuntu2.1+esm1 | < 3.2.0-4ubuntu7.2 | < 3.4.4-1ubuntu0.24.04.1 | < 3.4.4-1ubuntu0.25.10.1
5 vendors · 5 products
References
13 links- github.com/python-ldap/python-ldap/security/advisories/GHSA-r7r6-cc7p-4v5mX Refsource CONFIRMWEBREPORTAdvisoryExploitMitigationThird Party Advisory
- github.com/python-ldap/python-ldap/commit/3957526fb1852e84b90f423d9fef34c7af25b85aX Refsource MISCWEBREPORTFIXPatch
- github.com/python-ldap/python-ldap/releases/tag/python-ldap-3.4.5X Refsource MISCWEBREPORTRelease Notes
- pypi.org/project/python-ldapPACKAGE