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.

Severity (CVSS 4.0)5.5Medium
Exploit odds (30 days)0.5%top 60.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Alpine:v3.24py3-ldap3.4.5-r0ALPINE-CVE-2025-61912
Debian:12python-ldap3.4.3-2+deb12u1DEBIAN-CVE-2025-61912
Debian:13python-ldap3.4.4-1+deb13u1DEBIAN-CVE-2025-61912
Debian:14python-ldap3.4.5-1DEBIAN-CVE-2025-61912
PyPIpython-ldap3.4.5GHSA-p34h-wq7j-h5v6
PyPIpython-ldap3.4.5PYSEC-2026-1846
Ubuntu:22.04:LTSpython-ldap3.2.0-4ubuntu7.2USN-7828-1
Ubuntu:22.04:LTSpython-ldap3.2.0-4ubuntu7.2UBUNTU-CVE-2025-61912
Ubuntu:24.04:LTSpython-ldap3.4.4-1ubuntu0.24.04.1USN-7828-1
Ubuntu:24.04:LTSpython-ldap3.4.4-1ubuntu0.24.04.1UBUNTU-CVE-2025-61912
Ubuntu:25.10python-ldap3.4.4-1ubuntu0.25.10.1UBUNTU-CVE-2025-61912
Ubuntu:25.10python-ldap3.4.4-1ubuntu0.25.10.1USN-7828-1

Affected products (as reported)

VendorProductVersions
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

References