Python Driver
Monthly
An integer overflow in the BSON encoder of the MongoDB Python Driver's bundled native C extension (PyMongo before 4.18.2) can cause an out-of-bounds write inside the process hosting the driver when an application encodes a single document built from an unusually large (~2 GB) caller-supplied value. Only builds that link the C extension are affected - the pure-Python BSON fallback is not - and successfully triggering it requires that a large attacker-influenced value actually reach the encoding path, so most applications are exposed only through data they already accept from untrusted sources. The flaw is not confirmed as actively exploited (CISA KEV) and no public exploit code has been identified at time of analysis; the vendor has released 4.18.2 as the fixed version, and because impact is confined to the hosting application's own process, risk is best treated as a genuine but precondition-heavy memory-corruption issue.
Attackers can inject arbitrary additional servers into a PyMongo (MongoDB Python Driver) client's connection topology by smuggling the percent-encoded form of a host-list delimiter (for example %2C) inside a hostname value that an application places into a connection string, because PyMongo decodes percent-escapes before it splits the host list. The request is unauthenticated (CVSS 4.0 PR:N) but carries an attack-requirement prerequisite (AT:P): the target application must build a URI at runtime from a host the attacker can influence, meaning static or hardcoded connection strings are not exploitable. MongoDB's own CVSS 4.0 rating of 8.3 (High) is driven by a high integrity impact - the client may route its authentication exchange and subsequent database operations to the rogue host, which can observe limited information and return altered query results. No public exploit code or confirmed active exploitation was identified at time of analysis, and the issue is fixed in PyMongo 4.18.2.
A malformed-BSON out-of-bounds read in the MongoDB Python Driver (PyMongo) can terminate the host Python process when the native C accelerator (_cbson) is loaded. The flaw is reachable only when an application itself passes attacker-controlled BSON into the documented bson.decode() or decode_all() APIs with a truncated regular-expression element that lacks a trailing NUL byte; the driver's normal MongoDB wire-protocol query path never reaches this code, and installations running the pure-Python fallback are unaffected. Both the vendor CVSS 4.0 score (5.9, AV:L/AV:N-derived local vector, PR:N/UI:N, VA:H) and the independent CVSS 3.1 assessment (AV:L, PR:N, UI:N, C:N/I:N/A:H) agree this is an availability-only, denial-of-service condition with no data exposure or code execution, making it a moderate issue that most deployments can deprioritize; no public exploit code has been identified at time of analysis and the CVE is not in CISA KEV.
The MongoDB Python Driver (PyMongo) versions 3.9.0 through 4.18.1 can be induced to open connections to local Unix domain sockets on the application host when an attacker who already holds write access to the encryption key metadata in the database alters a key management (KMS) endpoint value so that it ends in '.sock' - a string the client-side field level encryption (CSFLE) code path mistakes for a local socket path instead of a remote host. Exploitation requires the opt-in, non-default CSFLE feature to be in use and an authenticated attacker with database-side write access to the key vault, and it is only reachable over the network in the sense that CVSS scores the vector AV:N/PR:L; the transmitted bytes are restricted to the beginning of a TLS handshake, so no attacker-chosen content reaches the socket and data exfiltration or arbitrary remote-host reachability is not achievable. No public exploit code has been identified at time of analysis and the issue is not in CISA KEV; despite the CWE-918 (SSRF) classification, this is a low-priority, low-impact defect. Vendor-released patch: 4.18.2.
NoSQL injection in the GridFS component of the MongoDB Python Driver allows an authenticated attacker who controls a caller-supplied file identifier to inject MongoDB query operators instead of literal identifiers. Depending on the affected operation, exploitation can expose stored file content beyond the intended target (reads), permanently destroy all GridFS file chunks in the affected bucket (deletes), or corrupt stored file metadata by renaming the wrong file (renames). No public exploit has been identified at time of analysis, and no KEV listing exists; the CVSS 4.0 score of 6.1 reflects the authentication requirement and the specific attack condition that the application must pass user-controlled identifiers directly to GridFS APIs.
An integer overflow in the BSON encoder of the MongoDB Python Driver's bundled native C extension (PyMongo before 4.18.2) can cause an out-of-bounds write inside the process hosting the driver when an application encodes a single document built from an unusually large (~2 GB) caller-supplied value. Only builds that link the C extension are affected - the pure-Python BSON fallback is not - and successfully triggering it requires that a large attacker-influenced value actually reach the encoding path, so most applications are exposed only through data they already accept from untrusted sources. The flaw is not confirmed as actively exploited (CISA KEV) and no public exploit code has been identified at time of analysis; the vendor has released 4.18.2 as the fixed version, and because impact is confined to the hosting application's own process, risk is best treated as a genuine but precondition-heavy memory-corruption issue.
Attackers can inject arbitrary additional servers into a PyMongo (MongoDB Python Driver) client's connection topology by smuggling the percent-encoded form of a host-list delimiter (for example %2C) inside a hostname value that an application places into a connection string, because PyMongo decodes percent-escapes before it splits the host list. The request is unauthenticated (CVSS 4.0 PR:N) but carries an attack-requirement prerequisite (AT:P): the target application must build a URI at runtime from a host the attacker can influence, meaning static or hardcoded connection strings are not exploitable. MongoDB's own CVSS 4.0 rating of 8.3 (High) is driven by a high integrity impact - the client may route its authentication exchange and subsequent database operations to the rogue host, which can observe limited information and return altered query results. No public exploit code or confirmed active exploitation was identified at time of analysis, and the issue is fixed in PyMongo 4.18.2.
A malformed-BSON out-of-bounds read in the MongoDB Python Driver (PyMongo) can terminate the host Python process when the native C accelerator (_cbson) is loaded. The flaw is reachable only when an application itself passes attacker-controlled BSON into the documented bson.decode() or decode_all() APIs with a truncated regular-expression element that lacks a trailing NUL byte; the driver's normal MongoDB wire-protocol query path never reaches this code, and installations running the pure-Python fallback are unaffected. Both the vendor CVSS 4.0 score (5.9, AV:L/AV:N-derived local vector, PR:N/UI:N, VA:H) and the independent CVSS 3.1 assessment (AV:L, PR:N, UI:N, C:N/I:N/A:H) agree this is an availability-only, denial-of-service condition with no data exposure or code execution, making it a moderate issue that most deployments can deprioritize; no public exploit code has been identified at time of analysis and the CVE is not in CISA KEV.
The MongoDB Python Driver (PyMongo) versions 3.9.0 through 4.18.1 can be induced to open connections to local Unix domain sockets on the application host when an attacker who already holds write access to the encryption key metadata in the database alters a key management (KMS) endpoint value so that it ends in '.sock' - a string the client-side field level encryption (CSFLE) code path mistakes for a local socket path instead of a remote host. Exploitation requires the opt-in, non-default CSFLE feature to be in use and an authenticated attacker with database-side write access to the key vault, and it is only reachable over the network in the sense that CVSS scores the vector AV:N/PR:L; the transmitted bytes are restricted to the beginning of a TLS handshake, so no attacker-chosen content reaches the socket and data exfiltration or arbitrary remote-host reachability is not achievable. No public exploit code has been identified at time of analysis and the issue is not in CISA KEV; despite the CWE-918 (SSRF) classification, this is a low-priority, low-impact defect. Vendor-released patch: 4.18.2.
NoSQL injection in the GridFS component of the MongoDB Python Driver allows an authenticated attacker who controls a caller-supplied file identifier to inject MongoDB query operators instead of literal identifiers. Depending on the affected operation, exploitation can expose stored file content beyond the intended target (reads), permanently destroy all GridFS file chunks in the affected bucket (deletes), or corrupt stored file metadata by renaming the wrong file (renames). No public exploit has been identified at time of analysis, and no KEV listing exists; the CVSS 4.0 score of 6.1 reflects the authentication requirement and the specific attack condition that the application must pass user-controlled identifiers directly to GridFS APIs.