CVE-2026-96747
mediumPriorität · verfolgen · 0EPSS 0.002 · 9. PerzentilDEUSEPSS · bewertet 2026-10-27
The client-side field level encryption support in the MongoDB Python Driver can treat a key management endpoint value ending in ".sock" as a local Unix domain socket path rather than a remote host. A user with write access to the encryption key metadata stored in the database can cause an application using the driver to open connections to local sockets on the application host. Data sent over these connections is limited to the start of a TLS handshake, so no chosen content is transmitted.
cvss
Technischer Schweregrad, 0–10. Eine Zeile je Quelle.
Basiswert 0–10 · höher = schwerwiegender · Vektor überfahren zum Auflösen⚠ Quellen uneinig · low–medium · 1.3–5.3
SSVC
Eine Handlungsentscheidung — aus Ausnutzung und Auswirkung.
schwächen
Die CWE-Schwächeklassen, zu denen dies gehört.
betroffene Produkte (11)
Betroffene Produkte und Versionsbereiche.
Advisories (3)
Hersteller- und Ökosystem-Meldungen dazu.
- WID-SEC-W-2026-3583MongoDB Treiber (Python Driver, PHP Driver, C Driver, Compass und Laravel): Mehrere SchwachstellenDeutsch2026-09-24csaf · cert_bundDE
Ein Angreifer kann mehrere Schwachstellen in verschiedenen MongoDB Treibern (Python Driver, PHP Driver, C Driver, Compass und Laravel) ausnutzen, um einen Denial of Service Angriff durchzuführen, um Daten zu manipulieren, um beliebigen Programmcode auszuführen und um einen nicht näher spezifizierten Angriff durchzuführen.
- GHSA-qx36-8mw2-4r3xPyMongo: PYTHON-5990 Forced Unix domain socket connection via a .sock KMS endpoint in client-side field level encryption2026-10-05ghsa · osvUS
### Summary PyMongo passed the KMS endpoint of a data key verbatim into `parse_host()`, which returns any string ending in `.sock` 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 `AF_UNIX`. Because the endpoint originates from `masterKey.endpoint` 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 `masterKey.endpoint` on a data key to a `.sock`-suffixed string causes the next KMS request for that key (key cache TTL is ~60 seconds) to open an `AF_UNIX` 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 `.sock` string as `server_hostname`, 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 `_EncryptionIO.kms_request` now rejects a `.sock`-suffixed KMS endpoint with `pymongo.errors.ConfigurationError` 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 `masterKey.endpoint` on data keys you create, and audit existing key vault documents for endpoints ending in `.sock`. ### Details - `_EncryptionIO.fetch_keys` reads key vault documents from the server and hands them to libmongocrypt, which surfaces the stored `masterKey.endpoint` verbatim as `kms_context.endpoint`. - `_EncryptionIO.kms_request` passed that string to `parse_host(endpoint, 443)`. `parse_host` returns entities ending in `.sock` verbatim, skipping the hostname and port validation applied to every other input. - `_create_connection` (and the async equivalent) checks `host.endswith(".sock")` and performs an `AF_UNIX` `sock.connect(host)`, treating the string as a filesystem path.
- PYSEC-2026-4295PyMongo: PYTHON-5990 Forced Unix domain socket connection via a .sock KMS endpoint in client-side field level encryption2026-10-15vendor · osvUS
### Summary PyMongo passed the KMS endpoint of a data key verbatim into `parse_host()`, which returns any string ending in `.sock` 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 `AF_UNIX`. Because the endpoint originates from `masterKey.endpoint` 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 `masterKey.endpoint` on a data key to a `.sock`-suffixed string causes the next KMS request for that key (key cache TTL is ~60 seconds) to open an `AF_UNIX` 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 `.sock` string as `server_hostname`, 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 `_EncryptionIO.kms_request` now rejects a `.sock`-suffixed KMS endpoint with `pymongo.errors.ConfigurationError` 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 `masterKey.endpoint` on data keys you create, and audit existing key vault documents for endpoints ending in `.sock`. ### Details - `_EncryptionIO.fetch_keys` reads key vault documents from the server and hands them to libmongocrypt, which surfaces the stored `masterKey.endpoint` verbatim as `kms_context.endpoint`. - `_EncryptionIO.kms_request` passed that string to `parse_host(endpoint, 443)`. `parse_host` returns entities ending in `.sock` verbatim, skipping the hostname and port validation applied to every other input. - `_create_connection` (and the async equivalent) checks `host.endswith(".sock")` and performs an `AF_UNIX` `sock.connect(host)`, treating the string as a filesystem path.
auch bekannt als (2)
Weitere Namen und Kennungen dieser Entität.
quellen
Welche Quellen diesen Datensatz belegen und wann.
Referenzen (3) nvd
Externe Belege — Patches, Meldungen, Analysen.
Angreifer nutzen Schwachstellen wie diese gegen im Internet exponierte Dienste aus. Sehen Sie mit einem kostenlosen Passiv-Scan, was exponiert ist.
Kostenloser Scan