CVE-2026-96747
PyMongo: PYTHON-5990 Forced Unix domain socket connection via a .sock KMS endpoint in client-side field level encryption
Published Oct 5, 2026 · corrected/updated Oct 15, 2026 · evidence confidence high
### Summary PyMongo passed the KMS endpoint of a data key verbatim into , which returns any string ending in unchanged instead of validating it as a hostname and port. The driver's connection code then treats such an address as a Unix domain socket path and connects to it with . Because the endpoint originates from in a key vault document, a party who can write to the key vault could redirect the driver's KMS connection to an arbitrary Unix domain socket path on the application host. ### Impact An application using client-side field level encryption (CSFLE) or Queryable Encryption is affected if an attacker can write to its key vault collection. Setting on a data key to a -suffixed string causes the next KMS request for that key (key cache TTL is ~60 seconds) to open an connection to the attacker-chosen filesystem path from inside the victim application process. The documented custom KMS endpoint feature supports TCP hosts only, so this crosses a boundary the feature was never intended to allow. Impact is limited to the side effects of the connection itself. The socket is still wrapped in a verifying TLS context using the string as , and insecure KMS TLS options are rejected, so the handshake always fails and the KMS message is never sent. The attacker controls the connect target but not the transmitted bytes (a fixed TLS ClientHello). Applications that do not use CSFLE or Queryable Encryption are not affected. Applications whose key vault is not writable by untrusted parties are not affected. ### Patches Fixed in PyMongo 4.18.2 now rejects a -suffixed KMS endpoint with immediately after parsing, before any connection is attempted, on both the synchronous and asynchronous paths. No application code changes are required beyond upgrading. ### Workarounds If you cannot upgrade immediately: - Restrict write access to the key vault collection to trusted principals only. This is the recommended configuration regardless of this issue. - Validate on data keys you create, an
Grounded briefings
Catalog interpretations for three audiences. Each brief cites ingested metadata and the original advisories below. They are not independent research and they do not invent exploit steps.
Executive
CVE-2026-96747 is a medium public vulnerability record for this product. It is not currently listed in the CISA Known Exploited catalog. Check the linked vendor or CERT advisories for patch status. This summary is a catalog interpretation of the ingested metadata and cites the original advisories below.
System administrator
Identify whether this product is in your estate, then compare installed versions with the affected ranges. Affected packages or ranges on record: pymongo (3.9.0 → 4.18.2). Check the linked vendor or CERT advisories for patch status. Prefer the vendor or distribution advisory linked in Sources before changing production systems. This is a catalog interpretation, not a runbook.
Security analyst
Signals on file: CVSS 5.0. It is not currently listed in the CISA Known Exploited catalog. Weakness classes: CWE-20, CWE-918. Sources contributing to this record: cve_org, github, osv. Public exploit references, when present, are outbound links only and are not proof of active exploitation. This is a catalog interpretation of stored metadata.
Exploitation and remediation
Exploitation evidence
Not listed as known exploited in CISA KEV. Not in the CISA KEV catalog.
Patch and remediation
No required-action text is stored yet. Use the vendor or CERT links in Sources for patch availability.
Safe detection guidance
Compare installed versions with the affected ranges below and verify the advisory from the original publisher. This site stores metadata and outbound links only; it does not ship exploit code or proof-of-concept payloads.
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Oct 5, 2026 · GitHub Advisory Database
Detected
### Summary PyMongo passed the KMS endpoint of a data key verbatim into , which returns any string ending in unchanged instead of validating it as a hostname and port. The driver's connection code then treats such an address as a Unix domain socket path and connects to it with . Because the endpoint originates from in a key vault document, a party who can write to the key vault could redirect the
Oct 15, 2026 · GitHub Advisory Database
Fix available
pymongo fixed in 4.18.2
Oct 15, 2026 · GitHub Advisory Database
Fix available
pymongo fixed in 4.18.2
Oct 15, 2026 · GitHub Advisory Database
Updated
### Summary PyMongo passed the KMS endpoint of a data key verbatim into , which returns any string ending in unchanged instead of validating it as a hostname and port. The driver's connection code then treats such an address as a Unix domain socket path and connects to it with . Because the endpoint originates from in a key vault document, a party who can write to the key vault could redirect the
Affected
- PyPI pymongo3.9.0 → 4.18.2
Sources
- CVE.orgVulnerability recordCVE-2026-96747
Official CVE identifier
cve.org - GitHub Advisory DatabasePackage advisoryGHSA-qx36-8mw2-4r3x
GitHub Advisory Database record mirrored by OSV.
github.com - OSV.devPackage advisoryGHSA-qx36-8mw2-4r3x
PyMongo: PYTHON-5990 Forced Unix domain socket connection via a .sock KMS endpoint in client-side field level encryption
osv.dev