Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2025-61911

MEDIUM 5.5EPSS 36%

python-ldap has sanitization bypass in ldap.filter.escape_filter_chars

Also known as GHSA-r7r6-cc7p-4v5m, PYSEC-2026-1847

Mitigation

  • Upgrade python-ldap to 3.4.5 or later.

Who should check

  • Projects that depend on PyPI package python-ldap (< 3.4.5)
  • Anyone running python-ldap < 3.4.5

Vulnerability facts

Affected
python-ldap < 3.4.5
Fixed in
3.4.5
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, no login needed
CVSS
5.5 (v4.0, CNA)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:POpen in CVSS calculator
Show all 12 CVSS metrics
  • Attack vector: Network
  • Attack complexity: Low
  • Attack requirements: None
  • Privileges required: None
  • User interaction: None
  • Confidentiality impact: Low
  • Integrity impact: Low
  • Availability impact: None
  • Confidentiality impact on other systems: None
  • Integrity impact on other systems: None
  • Availability impact on other systems: None
  • Exploit maturity: Proof of concept
EPSS
0.50% chance of exploitation in 30 days (percentile 36, 2026-11-26)
CWE
CWE-75, CWE-843
Published
Modified

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`.

Affected and fixed versions

Package / productAffectedFixedSource
PyPI python-ldap< 3.4.53.4.5osv
python-ldap< 3.4.5—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2025-61911. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-61911.md
Affected: python-ldap < 3.4.5
Fixed in: 3.4.5

Steps:
1. Search this machine and project for python-ldap (PyPI), python-ldap: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2025-61911 being exploited?

There is no confirmed exploitation: CVE-2025-61911 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.50% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2025-61911?

Medium: CVSS 5.5 (v4.0, scored by CNA). Remote, no login needed.

Which versions are affected by CVE-2025-61911?

python-ldap < 3.4.5.

Is there a fix for CVE-2025-61911?

Yes. Fixed in 3.4.5. Upgrade python-ldap to 3.4.5 or later.

How do I check if I'm affected by CVE-2025-61911?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors