cve.bz

CVE-2025-61911 python-ldap python-ldap: Type Confusion

5.5 mediumExploit referenceEPSS 0.3%Fix available

Medium (5.5) in python-ldap python-ldap. EPSS 0.3% estimated probability of exploitation activity in the next 30 days. Fixed in python-ldap 3.4.5.

On this page
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`.

Severity

CVSS 4.0

5.5 medium
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

CVSS 3.1

6.5 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
EPSS
0.3% (unchanged from 0.3% a week ago; 0.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 26th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2025-10-14. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-75 Failure to Sanitize Special Elements into a Different Plane
CWE-843 Access of Resource Using Incompatible Type (Type Confusion)
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-61911 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-61911?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-61911?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-61911 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
python-ldap:python-ldapbefore 3.4.5

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-r7r6-cc7p-4v5mPyPIpython-ldap<3.4.53.4.5
PYSEC-2026-1847PyPIpython-ldap<3.4.53.4.5

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12python-ldap3.4.3-2+deb12u1DEBIAN-CVE-2025-61911
Debian13python-ldap3.4.4-1+deb13u1DEBIAN-CVE-2025-61911
Debian14python-ldap3.4.5-1DEBIAN-CVE-2025-61911
Ubuntu22.04:LTSpython-ldap3.2.0-4ubuntu7.2UBUNTU-CVE-2025-61911 USN-7828-1
Ubuntu24.04:LTSpython-ldap3.4.4-1ubuntu0.24.04.1UBUNTU-CVE-2025-61911 USN-7828-1
Ubuntu25.10python-ldap3.4.4-1ubuntu0.25.10.1UBUNTU-CVE-2025-61911 USN-7828-1
UbuntuPro:16.04:LTSpython-ldap2.4.22-0.1ubuntu0.1~esm1UBUNTU-CVE-2025-61911 USN-7828-1
UbuntuPro:18.04:LTSpython-ldap3.0.0-1ubuntu0.2+esm1UBUNTU-CVE-2025-61911 USN-7828-1
UbuntuPro:20.04:LTSpython-ldap3.2.0-4ubuntu2.1+esm1UBUNTU-CVE-2025-61911 USN-7828-1
SUSELinux Enterprise Module for Package Hub 15 SP6python-ldap3.1.0-150100.3.5.1SUSE-SU-2025:3695-1
SUSELinux Enterprise Module for Package Hub 15 SP6python-ldap3.4.0-150400.3.3.1SUSE-SU-2025:3714-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0python-ldap3.4.4-160000.3.1SUSE-SU-2026:20933-1
openSUSELeap 15.6python-ldap3.4.0-150400.3.3.1SUSE-SU-2025:3714-1
openSUSELeap 16.0python-ldap3.4.4-160000.3.1openSUSE-SU-2026:20421-1
openSUSETumbleweedpython-ldap3.4.5-1.1openSUSE-SU-2025:15637-1
Alpinev3.24py3-ldap3.4.5-r0ALPINE-CVE-2025-61911
Azure Linux2python-ldapno fix listedAZL-68451
Azure Linux3python-ldapno fix listedAZL-68430

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This issue is rated Moderate severity because exploitation allows unauthorized manipulation or disclosure of LDAP data, but requires the library to be used in a specific manner (escape_mode=1 and supplying a list or dict). Typical deployments using default escape_mode=0 or escape_mode=2 are not exposed to this flaw.

```

It is important to note that the python-ldap3 package (https://github.com/cannatag/ldap3) is entirely separate and not affected. Only the python-ldap package (https://github.com/python-ldap/python-ldap) contains the vulnerable implementation.

```

Red Hat's mitigation

No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.

As an interim precaution, avoid using escape_mode=1 unless absolutely required.

ProductPackageStateAdvisory
Red Hat Ansible Automation Platform 2automation-controllerFix deferred
Red Hat Ansible Automation Platform 2python3.11-ldapFix deferred
Red Hat Ansible Automation Platform 2python3x-ldapFix deferred
Red Hat Enterprise Linux 10python-ldapFix deferred
Red Hat Enterprise Linux 6python-ldapOut of support scope
Red Hat Enterprise Linux 7python-ldapOut of support scope
Red Hat Enterprise Linux 8python-ldapOut of support scope
Red Hat Enterprise Linux 9python-ldapFix deferred
Red Hat OpenStack Platform 13 (Queens)rhosp13/openstack-aodh-apiOut of support scope
Red Hat OpenStack Platform 13 (Queens)rhosp13/openstack-aodh-baseOut of support scope
Red Hat OpenStack Platform 13 (Queens)rhosp13/openstack-aodh-evaluatorOut of support scope
Red Hat OpenStack Platform 13 (Queens)rhosp13/openstack-aodh-listenerOut of support scope
Red Hat OpenStack Platform 13 (Queens)rhosp13/openstack-aodh-notifierOut of support scope
Red Hat OpenStack Platform 13 (Queens)rhosp13/openstack-cinder-apiOut of support scope
Red Hat OpenStack Platform 13 (Queens)rhosp13/openstack-gnocchi-apiOut of support scope
Red Hat OpenStack Platform 13 (Queens)rhosp13/openstack-gnocchi-baseOut of support scope
Red Hat OpenStack Platform 13 (Queens)rhosp13/openstack-gnocchi-metricdOut of support scope
Red Hat OpenStack Platform 13 (Queens)rhosp13/openstack-gnocchi-statsdOut of support scope
Red Hat OpenStack Platform 13 (Queens)rhosp13/openstack-keystoneOut of support scope
Red Hat OpenStack Platform 13 (Queens)rhosp13/openstack-keystone-baseOut of support scope
16 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-61911.

Attack patterns (CAPEC)

  • CAPEC-81 Web Server Logs Tampering Likelihood: Medium · Severity: High
  • CAPEC-93 Log Injection-Tampering-Forging Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON