{"answers":{"affected":"3 open source packages ship an affected version, including python-ldap. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-61911 exists.","fix":"Upgrade python-ldap to 3.4.5 or later.","what":"CVE-2025-61911 is a medium-severity vulnerability in python-ldap, published on 10 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-61911 and fix it if it is affected.\n\nWhat it is: CVE-2025-61911 is a medium-severity vulnerability in python-ldap, published on 10 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-61911 exists.\n\nAffected packages and fixed versions:\n- python-ldap (PyPI): affected all versions; fixed in 3.4.5\n- python-ldap (PyPI): affected all versions; fixed in 3.4.5\n- python-ldap (PyPI): affected all versions; fixed in 3.4.5\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-61911/ (Markdown: https://insights.sbomify.com/CVE-2025-61911/index.md)","id":"CVE-2025-61911","markdown":"https://insights.sbomify.com/CVE-2025-61911/index.md","name":"CVE-2025-61911","record":{"aliases":["AZL-68430","AZL-68451","DEBIAN-CVE-2025-61911","ECHO-f6d8-9d6f-c927","GHSA-r7r6-cc7p-4v5m","OESA-2025-2683","PYSEC-2026-1847","UBUNTU-CVE-2025-61911"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":true,"product_category":"Python LDAP client library","requires_auth":"none","summary":"Attackers can bypass LDAP filter sanitization in python-ldap to inject queries and access or modify unauthorized directory data.","user_interaction":"not_required","vuln_class":"other"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"python-ldap","vendor":"python-ldap"}],"cvss":{"score":5.5,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:P","version":"4.0"},"cwes":[{"id":"CWE-843","name":"Access of Resource Using Incompatible Type"},{"id":"CWE-75","name":"Failure to Sanitize Special Elements into a Different Plane"}],"description":"python-ldap is a lightweight directory access protocol (LDAP) client API for Python. In versions prior to 3.4.5, the sanitization method `ldap.filter.escape_filter_chars` can be tricked to skip escaping of special characters when a crafted `list` or `dict` is supplied as the `assertion_value` parameter, and the non-default `escape_mode=1` is configured. The method `ldap.filter.escape_filter_chars` supports 3 different escaping modes. `escape_mode=0` (default) and `escape_mode=2` happen to raise exceptions when a `list` or `dict` object is supplied as the `assertion_value` parameter. However, `escape_mode=1` computes without performing adequate logic to ensure a fully escaped return value. If an application relies on the vulnerable method in the `python-ldap` library to escape untrusted user input, an attacker might be able to abuse the vulnerability to launch ldap injection attacks which could potentially disclose or manipulate ldap data meant to be inaccessible to them. Version 3.4.5 fixes the issue by adding a type check at the start of the `ldap.filter.escape_filter_chars` method to raise an exception when the supplied `assertion_value` parameter is not of type `str`.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"python-ldap has sanitization bypass in ldap.filter.escape_filter_chars","id":"CVE-2025-61911","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"other","year":"2025"},"n_packages":3,"n_references":3,"next":{"headline":"python-ldap Vulnerable to Improper Encoding or Escaping of Output and Improper Null Termination","id":"CVE-2025-61912"},"packages":[{"ecosystem":"PyPI","fixed":["3.4.5"],"introduced":["0"],"last_affected":[],"package":"python-ldap","purl":null,"source":"GHSA-r7r6-cc7p-4v5m"},{"ecosystem":"PyPI","fixed":["3.4.5"],"introduced":["0"],"last_affected":[],"package":"python-ldap","purl":"pkg:pypi/python-ldap","source":"GHSA-r7r6-cc7p-4v5m"},{"ecosystem":"PyPI","fixed":["3.4.5"],"introduced":["0"],"last_affected":[],"package":"python-ldap","purl":"pkg:pypi/python-ldap","source":"PYSEC-2026-1847"}],"prev":{"headline":"NASA ION-DTN BPv7 4.1.3s Uncontrolled Memory Allocation that leads to Denial-of-Service","id":"CVE-2025-61910"},"products":["python-ldap"],"published":"2025-10-10","related":[{"cvss_score":6.5,"headline":"Denial of Service in python-ldap","id":"CVE-2021-46823","kev_date_added":null,"published":"2022-06-18"},{"cvss_score":5.5,"headline":"python-ldap Vulnerable to Improper Encoding or Escaping of Output and Improper Null Termination","id":"CVE-2025-61912","kev_date_added":null,"published":"2025-10-10"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-10-14","vendors":["python-ldap"]},"summary":"Attackers can bypass LDAP filter sanitization in python-ldap to inject queries and access or modify unauthorized directory data.","url":"https://insights.sbomify.com/CVE-2025-61911/"}