Read the docs
TI-2025-38261 Aliases CVE-2025-61911GHSA-r7r6-cc7p-4v5m

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

Priority MEDIUM 58CWE-75Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
None
Impact type
—
Confidentiality · integrity · availability
Low · Low · None
Fix status
Partial Red Hat: 9 without a fix

Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat.

Summary

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

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.0032 25th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Partial python-ldap (python-ldap): 3.4.5python-ldap (PyPI): 3.4.5Red Hat: 9 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
python-ldappython-ldapbefore 3.4.53.4.5Patch availableCNA
—python-ldap (PyPI)before 3.4.53.4.5Patch availableGHSA-r7r6-cc7p-4v5m
  • python-ldap Vendorpython-ldap Affected before 3.4.5 Fixed in 3.4.5 Patch available CNA
  • python-ldap (PyPI) Vendor— Affected before 3.4.5 Fixed in 3.4.5 Patch available GHSA-r7r6-cc7p-4v5m

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:python-ldap:python-ldap:*:*:*:*:*:*:*:*before 3.4.5Vulnerablepython-ldap
  • cpe:2.3:a:python-ldap:python-ldap:*:*:*:*:*:*:*:* Versions before 3.4.5 Vulnerable ·python-ldap

Remediation

  • Fix · CNA python-ldap (python-ldap) Fixed in 3.4.5
  • Fix · GHSA-r7r6-cc7p-4v5m python-ldap (PyPI) Fixed in 3.4.5 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Ansible Automation Platform 2AffectedNo fix yet: Fix deferred
Red Hat Enterprise Linux 10AffectedNo fix yet: Fix deferred
Red Hat Enterprise Linux 6AffectedNo fix planned: Out of support scope
Red Hat Enterprise Linux 7AffectedNo fix planned: Out of support scope
Red Hat Enterprise Linux 8AffectedNo fix planned: Out of support scope
Red Hat Enterprise Linux 9AffectedNo fix yet: Fix deferred
Red Hat OpenStack Platform 13 (Queens)AffectedNo fix planned: Out of support scope
Red Hat Quay 3AffectedNo fix yet: Fix deferred
Red Hat Satellite 6AffectedNo fix yet: Fix deferred

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-61911
  2. 2026-10-03 Alias added: GHSA-r7r6-cc7p-4v5m

References

  • TI-2025-38262 python-ldap Vulnerable to Improper Encoding or Escaping of Output and Improper Null Termination CVSS 4.0MEDIUM 5.5
  • TI-2021-21516 python-ldap before 3.4.0 is vulnerable to a denial of service when ldap.schema is used… CVSS 3.1MEDIUM 6.5

Sources