CVE-2025-61911
MEDIUM 5.5CVSS 4.0python-ldap has sanitization bypass in ldap.filter.escape_filter_chars
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.
- Published
- 10 Oct 2025
- Last modified
- 19 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-75CWE-843
- Also known as
- GHSA-r7r6-cc7p-4v5mPYSEC-2026-1847
- Sources
- NVDJSONOSV GHSA-r7r6-cc7p-4v5mJSONOSV PYSEC-2026-1847JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | MEDIUM 5.5 | CVSS: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 | GitHub | CVSS 4.0 | CVSS: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 | |
| OSV | PyPA | CVSS 4.0 | CVSS: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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | python-ldap | python-ldapcpe:2.3:a:python-ldap:python-ldap:*:*:*:*:*:*:*:* |
< 3.4.5 | 3.4.5 |
| OSV | PyPI | python-ldap | < 3.4.5 | 3.4.5 |
References
- https://github.com/python-ldap/python-ldap/commit/3957526fb1852e84b90f423d9fef34c7af25b85a · Patch, WEB
- https://github.com/python-ldap/python-ldap/releases/tag/python-ldap-3.4.5 · Release Notes, WEB
- https://github.com/python-ldap/python-ldap/security/advisories/GHSA-r7r6-cc7p-4v5m · Exploit, Mitigation, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-61911 · ADVISORY
- https://github.com/python-ldap/python-ldap · PACKAGE
- https://pypi.org/project/python-ldap · PACKAGE
- https://github.com/advisories/GHSA-r7r6-cc7p-4v5m · ADVISORY
History
- 25 Nov 2026 20:59 UTC · NVD: first stored (published 10 Oct 2025)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 10 Oct 2025)