# CVE-2026-96747: MongoDB Python Driver Unix socket misinterpretation in key management

Source: https://junglewise.ai/threats/cve-2026-96747-the-client-side-field-level-encryption-support-in-the-mongodb  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-24. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-96747 · Severity: medium · CVSS 5 · Published 2026-09-24

The MongoDB Python Driver's client-side encryption feature can be tricked into opening connections to local Unix sockets on the application server instead of connecting to legitimate key management endpoints. An attacker with write access to the database can modify encryption key metadata to redirect connections to local sockets, potentially exposing sensitive system data or causing application disruption.

Technologies: [MongoDB Python Driver](https://junglewise.ai/threats/technologies/mongodb-python-driver), [pymongo (PyPI)](https://junglewise.ai/threats/technologies/pymongo). Vendors: [MongoDB](https://junglewise.ai/threats/vendors/mongodb), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-96747 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-96747 being exploited in the wild.

**How severe is CVE-2026-96747?** Medium severity, with a CVSS score of 5, published 24 September 2026.

**Which products and versions are affected?** MongoDB Python Driver before 4.18.2; pymongo (PyPI) >= 3.9.0, <= 4.18.1, ECOSYSTEM:introduced=3.9.0,fixed=4.18.2.

**Is there a fix for CVE-2026-96747?** Yes. pymongo (PyPI): upgrade to 4.18.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-96747 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-96747?** Check whether you run MongoDB Python Driver or pymongo (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- pymongo (PyPI): upgrade to 4.18.2 or later

  ```sh
  pip install "pymongo>=4.18.2"
  ```


## Technical details

The vulnerability stems from improper endpoint URL validation in the key management code path. When a key management endpoint URL ends with ".sock", the driver mistakenly treats it as a local Unix domain socket path rather than a remote hostname. An attacker with database write permissions can modify encrypted field metadata to inject malicious endpoint URLs, causing the application to establish connections to arbitrary local sockets. Data exposure is limited to TLS handshake content only.

## Affected products

- MongoDB Python Driver before 4.18.2

## Identifiers

- CVE-2026-96747
- GHSA-qx36-8mw2-4r3x
- PYSEC-2026-4295

## Timeline

- 2026-09-24: disclosed: CVE-2026-96747 published
- 2026-09-24: patched: Fix released in PyMongo 4.18.2

## References

- [https://github.com/mongodb/mongo-python-driver/blob/4.18.2/doc/changelog.rst](https://github.com/mongodb/mongo-python-driver/blob/4.18.2/doc/changelog.rst)
- [https://github.com/mongodb/mongo-python-driver/releases/tag/4.18.2](https://github.com/mongodb/mongo-python-driver/releases/tag/4.18.2)

## Related threats

- [MongoDB Python Driver out-of-bounds read in BSON decoding](https://junglewise.ai/threats/duplicate-advisory-python-6110-out-of-bounds-read-in-bson-decoding-via-96ff82c3)
- [MongoDB Python Driver buffer over-read in BSON regex parsing](https://junglewise.ai/threats/cve-2026-106435-the-mongodb-python-driver-s-binary-accelerator-can-read-outside)
- [MongoDB Python Driver integer overflow in BSON encoding](https://junglewise.ai/threats/cve-2026-96749-an-integer-overflow-in-the-bson-document-encoding-component-of)
- [PyMongo connection string parsing host injection](https://junglewise.ai/threats/cve-2026-96748-pymongo-s-connection-string-parsing-decodes-percent-encoded)
- [MongoDB Python Driver improper neutralization in GridFS](https://junglewise.ai/threats/duplicate-advisory-pymongo-python-5994-use-exact-match-for-file-id-in-d4dd5355)
