CVE-2025-61912: python-ldap Improper Encoding or Escaping of Output
Vulnerability summary
CVE-2025-61912 is a medium (CVSS 5.5) Improper Encoding or Escaping of Output vulnerability in python-ldap. EPSS estimates a 0.46% chance of exploitation in the next 30 days, higher than 38.3% of scored vulnerabilities. 1 public exploit is recorded.
Advisory lineage
Upstream 0 · Downstream 6 · Related 8Timeline
- 10-10-2025PublishedVulnerability first disclosed.
- 14-10-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
8 scores · 6 sources · 2 versions- OSV · PypiEcosystem advisory · calculated6.9MediumCVSS: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:PDiffers
- OSV · UbuntuEcosystem advisory · calculated6.9MediumCVSS: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:PDiffers
- OSV · ChainguardEcosystem advisory · calculated6.9MediumCVSS: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:PDiffers
- NVDNIST5.5MediumCVSS: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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · DebianEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- NVDNIST5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
EPSS trend
Probability
0.46%
Chance of exploitation in the next 30 days
Percentile
38%
Versus all other CVEs
30-day change
0.00 pp
From 0.46% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundPython Ldap
Maturity: poc
Weaknesses
CWE · root cause- CWE-116Improper Encoding or Escaping of OutputThe product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.
- CWE-170Improper Null TerminationThe product does not terminate or incorrectly terminates a string or array with a null character or equivalent terminator.
Affected systems
Chainguard1 product
- awx< 24.6.1-r18
Debian1 product
- python-ldap< 3.4.3-2+deb12u1 | < 3.4.4-1+deb13u1 | < 3.4.5-1
PyPI1 product
- python-ldap< 3.4.5
Python-ldap1 product
- python-ldap< 3.4.5
Ubuntu1 product
- python-ldap< 2.4.22-0.1ubuntu0.1~esm1 | < 3.0.0-1ubuntu0.2+esm1 | < 3.2.0-4ubuntu2.1+esm1 | < 3.2.0-4ubuntu7.2 | < 3.4.4-1ubuntu0.24.04.1 | < 3.4.4-1ubuntu0.25.10.1
5 vendors · 5 products
References
13 links- github.com/python-ldap/python-ldap/security/advisories/GHSA-p34h-wq7j-h5v6X Refsource CONFIRMWEBREPORTAdvisoryExploitThird Party Advisory
- github.com/python-ldap/python-ldap/commit/6ea80326a34ee6093219628d7690bced50c49a3fX Refsource MISCWEBREPORTFIXPatch
- github.com/python-ldap/python-ldap/releases/tag/python-ldap-3.4.5X Refsource MISCWEBREPORTRelease Notes
- pypi.org/project/python-ldapPACKAGE