Vulnerability · Published Oct 10, 2025 · Assigned by GitHub_M
CVE-2025-61912python-ldap Vulnerable to Improper Encoding or Escaping of Output and Improper Null Termination
Medium 5.5
In plain English
A medium-severity security flaw in python-ldap from python-ldap. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 40% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.24 | py3-ldap | 3.4.5-r0 | ALPINE-CVE-2025-61912 |
| Debian:12 | python-ldap | 3.4.3-2+deb12u1 | DEBIAN-CVE-2025-61912 |
| Debian:13 | python-ldap | 3.4.4-1+deb13u1 | DEBIAN-CVE-2025-61912 |
| Debian:14 | python-ldap | 3.4.5-1 | DEBIAN-CVE-2025-61912 |
| PyPI | python-ldap | 3.4.5 | GHSA-p34h-wq7j-h5v6 |
| PyPI | python-ldap | 3.4.5 | PYSEC-2026-1846 |
| Ubuntu:22.04:LTS | python-ldap | 3.2.0-4ubuntu7.2 | USN-7828-1 |
| Ubuntu:22.04:LTS | python-ldap | 3.2.0-4ubuntu7.2 | UBUNTU-CVE-2025-61912 |
| Ubuntu:24.04:LTS | python-ldap | 3.4.4-1ubuntu0.24.04.1 | USN-7828-1 |
| Ubuntu:24.04:LTS | python-ldap | 3.4.4-1ubuntu0.24.04.1 | UBUNTU-CVE-2025-61912 |
| Ubuntu:25.10 | python-ldap | 3.4.4-1ubuntu0.25.10.1 | UBUNTU-CVE-2025-61912 |
| Ubuntu:25.10 | python-ldap | 3.4.4-1ubuntu0.25.10.1 | USN-7828-1 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| python-ldap | python-ldap | < 3.4.5 |
Weakness: CWE-116, CWE-170 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P