Skip to content
OpenAdvisories
Medium · 5.5 CVE-2025-61912 EUVD-2025-33796GHSA-p34h-wq7j-h5v6PYSEC-2026-1846

python-ldap Vulnerable to Improper Encoding or Escaping of Output and Improper Null Termination

Published Oct 10, 2025 · Updated Oct 14, 2025 · Assigned by GitHub_M

Description

python-ldap is a lightweight directory access protocol (LDAP) client API for Python. In versions prior to 3.4.5, ldap.dn.escape_dn_chars() escapes \x00 incorrectly by emitting a backslash followed by a literal NUL byte instead of the RFC-4514 hex form \00. Any application that uses this helper to construct DNs from untrusted input can be made to consistently fail before a request is sent to the LDAP server (e.g., AD), resulting in a client-side denial of service. Version 3.4.5 contains a patch for the issue.

Affected products

VendorProductAffectedFixed
python-ldap python-ldap < 3.4.5 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-ldap 3.4.5-1 —
Debian 13 python-ldap 3.4.4-1+deb13u1 —
Debian 12 python-ldap 3.4.3-2+deb12u1 —
ReleasePackageFixed inAdvisory
Ubuntu 25.10 python-ldap 3.4.4-1ubuntu0.25.10.1 USN-7828-1
Ubuntu 24.04 LTS python-ldap 3.4.4-1ubuntu0.24.04.1 USN-7828-1
Ubuntu 22.04 LTS python-ldap 3.2.0-4ubuntu7.2 USN-7828-1
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS python-ldap 3.2.0-4ubuntu2.1+esm1 USN-7828-1
Ubuntu Pro 18.04 LTS python-ldap 3.0.0-1ubuntu0.2+esm1 USN-7828-1
Ubuntu Pro 16.04 LTS python-ldap 2.4.22-0.1ubuntu0.1~esm1 USN-7828-1
ReleasePackageFixed inAdvisory
SLES 15 SP6 python-ldap 3.1.0-150100.3.5.1 SUSE-SU-2025:3714-1, SUSE-SU-2025:3695-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 python-ldap 3.4.4-160000.3.1 SUSE-SU-2026:20933-1
SLES 16.0 python-ldap 3.4.4-160000.3.1 SUSE-SU-2026:20933-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-ldap 3.4.5-1.1 openSUSE-SU-2025:15637-1
openSUSE Leap 16.0 python-ldap 3.4.4-160000.3.1 openSUSE-SU-2026:20421-1
openSUSE Leap 15.6 python-ldap 3.4.0-150400.3.3.1 SUSE-SU-2025:3714-1
ReleasePackageFixed inAdvisory
Alpine v3.24 py3-ldap 3.4.5-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2 python-ldap 2.4.15-2.amzn2.0.6 ALAS2-2025-3058

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 python-ldap No fix yet —
Azure Linux 2 (CBL-Mariner) python-ldap No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI python-ldap < 3.4.5 3.4.5 GHSA-p34h-wq7j-h5v6

Advisories 8

References