Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to application with low-privilege account
-
DeliverySubmit structured operator dict as file identifier via API
-
ExploitDriver incorporates operator into GridFS query
-
ExecutionQuery matches unintended file documents
-
ImpactRead arbitrary chunk data, delete all bucket chunks, or rename wrong stored file
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Query language parameterization
|
| Exploitation Conditions | Exploitation requires all of the following: (1) the target application uses the MongoDB Python Driver's GridFS component for file storage; (2) the application accepts user-supplied input and passes it - without scalar-type validation - as the file identifier argument to a GridFS operation (get, delete, or rename); (3) the attacker is authenticated to the application with at least low-privilege access to the file-management feature. Exploitation is NOT possible against applications that construct GridFS identifiers entirely from internal, trusted sources (e.g., database-generated ObjectIds stored server-side). The AT:P (Attack Requirements: Present) metric in the CVSS 4.0 vector confirms that a specific deployment pattern - user-controlled identifier passed to GridFS - is a prerequisite, not a default condition. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:H/VA:H) encapsulates the risk accurately. The AT:P (Attack Requirements: Present) metric is the critical limiting factor: exploitation requires that the target application passes user-controlled input directly to GridFS operations without sanitizing or validating that the identifier is a literal scalar rather than a structured object. This is an application-architecture condition, not an inherent driver configuration, meaning many deployments may be unaffected if they construct identifiers internally. Authentication at low privilege is required (PR:L), ruling out unauthenticated mass-exploitation scenarios. The integrity and availability impacts are genuinely high - an attacker who meets the conditions can wipe all GridFS chunks in a bucket or corrupt file associations, which is destructive and potentially irreversible without backups. Confidentiality impact is rated low (VC:L), indicating partial file content exposure rather than full bucket enumeration. EPSS data is absent; KEV status is not listed. No public exploit has been identified at time of analysis. The overall real-world risk is moderate-to-high for applications that expose file management APIs backed by GridFS with insufficient input validation, but low for applications that construct identifiers from trusted internal sources. |
| Exploit ScenarioDerived | An authenticated user of a file-management application backed by MongoDB GridFS submits a filename or file ID field containing a Python dict such as {'$gt': ''} via an API endpoint. The application passes this value directly to the PyMongo GridFS delete or rename operation, which converts it to a MongoDB query condition matching all documents where the identifier field is greater than an empty string - effectively the entire bucket. All GridFS chunks for matched files are removed, rendering every stored file in the bucket unreadable. No public exploit code has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 10, 2026
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.
RemediationAI
Vendor-released patch information is not confirmed from the available data; the upstream fix is tracked at jira.mongodb.org/browse/PYTHON-5994 - monitor this ticket and upgrade to the patched PyMongo release once published. As an immediate compensating control, applications should validate that any caller-supplied file identifier is a scalar type (e.g., a bson.ObjectId, a string, or an integer) and reject structured dict-like inputs before passing them to GridFS operations such as get(), delete(), and rename(); this can be enforced with a simple isinstance check at the application boundary. Additionally, restrict the privilege scope of application database users so that GridFS delete and rename operations are only available to roles that genuinely require them, limiting the blast radius of exploitation. Auditing existing application code for all call sites that accept user input as GridFS identifiers is advisable regardless of patch status.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in pypi, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
MongoDB's GridFS specification stores files exceeding the BSON 16 MB document limit by splitting them into chunks stored across two collections: fs.files (metadata) and fs.chunks (binary data). The MongoDB Python Driver (PyMongo) exposes GridFS operations such as get, put, delete, and rename. The root cause - CWE-943, Improper Neutralization of Special Elements in Data Query Logic - occurs when the driver accepts a 'structured' (dict-like) identifier supplied by the caller and incorporates it into a MongoDB query without enforcing that it must resolve to a literal value. Python dicts naturally represent MongoDB query documents, so a caller-supplied value such as {'$gt': ''} or {'$ne': None} is silently reinterpreted as a query operator expression rather than a precise file ObjectId or filename literal, causing the underlying query to match unintended documents. The Jira ticket PYTHON-5994 at jira.mongodb.org tracks this issue against the PyMongo driver. No CPE string was provided; affected versions must be inferred from the advisory once published.
Know when MongoDB gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N
PR:L for required low-privilege authentication; C:L for partial file exposure; I:H and A:H for destructive rename/delete of unintended GridFS documents.
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H
Primary rating from Vendor (mongodb).
CVSS VectorVendor: mongodb
Lifecycle Timeline
2DescriptionCVE.org
Improper neutralization of special elements in data query logic in the GridFS component of the MongoDB Python Driver can cause a caller-supplied structured file identifier to be interpreted as a query condition rather than as a literal identifier. An authenticated user who can influence the identifier passed by an affected application may obtain stored file content beyond the intended target or cause all GridFS file chunks in the affected bucket to be removed, rendering stored file content unreadable. The affected rename operation may also rename a stored file other than the intended target.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
NoSQL injection exploits databases that don't use traditional SQL syntax-like MongoDB, CouchDB, or Redis-by manipulating queries through unsanitized user input.
MongoDB before 2.0.9 and 2.2.x before 2.2.4 does not properly validate requests to the nativeHelper function in SpiderMo
Use-after-free in MongoDB Server's replication component can terminate replica set members unexpectedly and, under certa
The find prototype in scripting/engine_v8.h in MongoDB 2.4.0 through 2.4.4 allows remote authenticated users to cause a
The MongoDB bson JavaScript module (also known as js-bson) versions 0.5.0 to 1.0.x before 1.0.5 is vulnerable to a Regul
Remote code execution in Chartbrew versions prior to 4.8.1 allows authenticated attackers with high privileges to execut
After user deletion in MongoDB Server the improper invalidation of authorization sessions allows an authenticated user's
The default configuration for MongoDB before 2.3.2 does not validate objects, which allows remote authenticated users to
Authenticated command injection in Dokploy before 0.31.1 lets any user who can update a MySQL, PostgreSQL, MariaDB, Mong
SimStudio below 0.5.74 has a missing authorization on MongoDB tool endpoints that allows attackers to execute arbitrary
MongoDB Server may access non-initialized region of memory leading to unexpected behaviour when zero arguments are calle
MongoDB Compass may be susceptible to code injection due to insufficient sandbox protection settings with the usage of e
Under certain configurations of --tlsCAFile and tls.CAFile, MongoDB Server may skip peer certificate validation which ma
Same technique Information Disclosure
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Not-Affected |
| openSUSE Leap 15.3 | Not-Affected |
| openSUSE Leap 15.4 | Not-Affected |
| openSUSE Leap 15.5 | Not-Affected |
| openSUSE Leap 15.6 | Not-Affected |
EUVD-2026-75665
GHSA-8h2c-ghff-mpg9
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB