# CVE-2025-61912: python-ldap Vulnerable to Improper Encoding or Escaping of Output and Improper Null Termination

- Severity: Medium 5.5 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.48%, higher than 43% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-10-10T22:04:25.028Z
- Modified: 2026-10-19T16:10:00.260Z
- Also known as: GHSA-p34h-wq7j-h5v6, PYSEC-2026-1846
- Weaknesses: CWE-116, CWE-170
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- python-ldap python-ldap: < 3.4.5; before 3.4.5
- python-ldap (PyPI): before 3.4.5

## Every score

- GitHub_M: CVSS:4.0 5.5 Medium `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`
- GitHub: CVSS:4.0 Medium `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`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- PyPA Advisory Database: CVSS:4.0 `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

- <https://github.com/python-ldap/python-ldap/security/advisories/GHSA-p34h-wq7j-h5v6> (exploit, third-party-advisory, web)
- <https://github.com/python-ldap/python-ldap/commit/6ea80326a34ee6093219628d7690bced50c49a3f> (patch, web)
- <https://github.com/python-ldap/python-ldap/releases/tag/python-ldap-3.4.5> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-61912> (advisory)
- <https://github.com/python-ldap/python-ldap> (package)
- <https://pypi.org/project/python-ldap> (package)
- <https://github.com/advisories/GHSA-p34h-wq7j-h5v6> (advisory)

## Sources

- CVE List: [CVE-2025-61912](https://www.cve.org/CVERecord?id=CVE-2025-61912), CVE Terms of Use, modified 2025-10-14
- GitHub Advisory Database: [GHSA-p34h-wq7j-h5v6](https://github.com/advisories/GHSA-p34h-wq7j-h5v6), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-61912](https://nvd.nist.gov/vuln/detail/CVE-2025-61912), Public domain, modified 2026-10-19
- PyPA Advisory Database: [PYSEC-2026-1846](https://osv.dev/vulnerability/PYSEC-2026-1846), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2025-61912 · Whole record: https://cve.day/CVE-2025-61912.json · Rebuilt by cve.day 2026-11-25T22:59:05.780Z
