Red Hat VEX
RHVEX-CVE-2025-61912
python-ldap: python-ldap Vulnerable to Improper Encoding or Escaping of Output and Improper Null Termination
Details
A vulnerability exists in the python-ldap's ldap.dn.escape_dn_chars() helper function, where the null byte (\x00) is improperly escaped by emitting a backslash followed by a literal NUL instead of the required RFC 4514 hex form \00. When this helper is used on untrusted input to build LDAP distinguished names (DNs), it may cause a client-side failure, before any communication with the LDAP server occurs. This results in a client side denial of service (DoS) for parts of the application that rely on the helper for DN construction.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Red Hat:enterprise_linux:10 | python3-ldap | All versions, no fix (fix deferred) |
| Red Hat:enterprise_linux:6 | python-ldap | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | python-ldap | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:8 | python3-ldap | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:9 | python3-ldap | All versions, no fix (fix deferred) |
References
- https://access.redhat.com/security/cve/CVE-2025-61912
- https://bugzilla.redhat.com/show_bug.cgi?id=2403230
- https://www.cve.org/CVERecord?id=CVE-2025-61912
- https://nvd.nist.gov/vuln/detail/CVE-2025-61912
- https://github.com/python-ldap/python-ldap/commit/6ea80326a34ee6093219628d7690bced50c49a3f
- https://github.com/python-ldap/python-ldap/releases/tag/python-ldap-3.4.5
- https://github.com/python-ldap/python-ldap/security/advisories/GHSA-p34h-wq7j-h5v6