Skip to content
Fencer Intel
medium 6.5

CVE-2025-61911 json

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

published last yr. modified 21d ago also EUVD-2025-33797 , GHSA-r7r6-cc7p-4v5m , PYSEC-2026-1847

cvss
6.5
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
0.3%
EPSS 0.3% chance of exploitation in 30 days, percentile 25%
public exploits
0
none known

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

Patch / fix

  • pypi python-ldap 3.4.5
  • python-ldap python-ldap 3.4.5
  • python-ldap Debian 12 3.4.3-2+deb12u1
  • python-ldap Debian 13 3.4.4-1+deb13u1
  • python-ldap Debian 14 3.4.5-1

debian advisories DEBIAN-CVE-2025-61911

  • python-ldap Ubuntu 22.04 LTS 3.2.0-4ubuntu7.2
  • python-ldap Ubuntu 24.04 LTS 3.4.4-1ubuntu0.24.04.1
  • python-ldap Ubuntu 25.10 3.4.4-1ubuntu0.25.10.1
  • python-ldap Ubuntu Pro 16.04 LTS 2.4.22-0.1ubuntu0.1~esm1
  • python-ldap Ubuntu Pro 18.04 LTS 3.0.0-1ubuntu0.2+esm1
  • python-ldap Ubuntu Pro 20.04 LTS 3.2.0-4ubuntu2.1+esm1

ubuntu advisories UBUNTU-CVE-2025-61911

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • python-ldap SLES for SAP applications 16.0, SLES 16.0 3.4.4-160000.3.1
  • python-ldap SLE Module for Package Hub 15 SP6, openSUSE Leap 15.6 3.4.0-150400.3.3.1
  • python-ldap SLE Module for Package Hub 15 SP6 3.1.0-150100.3.5.1

suse advisories SUSE-SU-2026:20933-1SUSE-SU-2025:3714-1SUSE-SU-2025:3695-1

  • python-ldap openSUSE Leap 16.0 3.4.4-160000.3.1
  • python-ldap openSUSE Tumbleweed 3.4.5-1.1

opensuse advisories openSUSE-SU-2026:20421-1openSUSE-SU-2025:15637-1

  • py3-ldap Alpine 3.24 3.4.5-r0

alpine advisories ALPINE-CVE-2025-61911

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Is CVE-2025-61911 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2025-61911 updated cvss 6.5

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

  • Red Hat Ansible Automation Platform 2 python3x-ldap, python3.11-ldap, automation-controller
    affected: workaround, no fix available “Fix deferred”
  • Red Hat Enterprise Linux 6 python-ldap Red Hat Enterprise Linux 7 python-ldap Red Hat Enterprise Linux 8 python3-ldap
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat Enterprise Linux 9 python3-ldap Red Hat Enterprise Linux 10 python-ldap
    affected: workaround, no fix available “Fix deferred”
  • Red Hat OpenStack Platform 13 (Queens) rhosp13/openstack-aodh-api, rhosp13/openstack-keystone, rhosp13/openstack-nova-api, rhosp13/openstack-aodh-base, rhosp13/openstack-nova-base, rhosp13/openstack-panko-api, +19 more
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat Quay 3 quay/quay-rhel8 Red Hat Satellite 6 python-ldap, python3.12-ldap
    affected: workaround, no fix available “Fix deferred”

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
Proof of concept is public
Automatable
no
Technical impact
partial
Assessed
last yr.

Exploit prediction

0.32% chance of exploitation in the next 30 days, higher than 25% of all scored CVEs (FIRST EPSS, 2026-11-09).

Exploits and checks

  • github.com https://github.com/python-ldap/python-ldap/security/advisories/GHSA-r7r6-cc7p-4v5m referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 4.0 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
CNA 4.0 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
NVD 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Affected packages

ecosystem package affected fixed in
pypi python-ldap
<3.4.5
3.4.5

Affected products

  • python-ldap python-ldap

Classification

Weakness
  • CWE-75 Failure to Sanitize Special Elements into a Different Plane
  • CWE-843 Access of Resource Using Incompatible Type

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.