Skip to content
Heist/ feed
Back to feed
MediumFix available

python-ldap — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2025-61911

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

Products
python-ldap
Affected versions
3.4.3-2, 3.4.4-1, 3.4.4-2
Fixed versions
3.4.3-2+deb12u1, 3.4.4-1+deb13u1, 3.4.5-1
CVEs
CVE-2025-61911
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 22:43 UTC · Revision 1

Source evidence

DEBIAN-CVE-2025-61911

core-osv · Original source

Published 10 Oct 2025, 22:15 UTC

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

osv:DEBIAN-CVE-2025-61911

python-ldap

Fixed versions: 3.4.3-2+deb12u1

python-ldap

Fixed versions: 3.4.4-1+deb13u1

python-ldap

Fixed versions: 3.4.5-1

Complete source record
{
  "id": "f74b10f81fa5d0a6647ee7841597c24e507fc8c01375b35ffeeb1a3da9d5d2e0",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2025-61911",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2025-61911",
    "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`.",
    "evidence": "osv:DEBIAN-CVE-2025-61911",
    "products": [
      {
        "name": {
          "value": "python-ldap",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "3.4.3-2+deb12u1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "3.4.3-2",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "python-ldap",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "3.4.4-1+deb13u1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "3.4.4-1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "python-ldap",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "3.4.5-1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "3.4.4-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "3.4.4-2",
            "evidence": "/affected/2/versions"
          }
        ]
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "DEBIAN-CVE-2025-61911",
      "aliases": [
        "DEBIAN-CVE-2025-61911"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3.4.3-2+deb12u1"
                }
              ]
            }
          ],
          "package": {
            "name": "python-ldap",
            "purl": "pkg:deb/debian/python-ldap?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "versions": [
            "3.4.3-2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2025-61911.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3.4.4-1+deb13u1"
                }
              ]
            }
          ],
          "package": {
            "name": "python-ldap",
            "purl": "pkg:deb/debian/python-ldap?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "versions": [
            "3.4.4-1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2025-61911.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3.4.5-1"
                }
              ]
            }
          ],
          "package": {
            "name": "python-ldap",
            "purl": "pkg:deb/debian/python-ldap?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "versions": [
            "3.4.4-1",
            "3.4.4-2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2025-61911.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-23T17:47:28.928428460Z",
      "provider": "osv",
      "upstream": [
        "CVE-2025-61911"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2025-61911"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2025-61911",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 417162,
  "published_at": "2025-10-10T22:15:37.47+00:00"
}