Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to application with low-privilege credentials
-
DeliveryIdentify application endpoint accepting file identifier input
-
ExploitSupply crafted Hash containing MongoDB query operators as identifier
-
ExecutionDriver forwards hash to MongoDB GridFS query layer
-
PersistMongoDB interprets hash as query condition
-
ImpactRead unauthorized file chunks or delete all bucket chunks causing permanent data loss
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) a valid authenticated session with at least low-privilege access to the application (confirmed by PR:L in the CVSS vector); (2) the application must accept caller-supplied input and pass it as a file identifier to a GridFS operation in the MongoDB Ruby Driver without prior coercion to a strict BSON literal type such as BSON::ObjectId or a validated string - this is the AT:P precondition; (3) for the deletion/availability impact, a code path triggering a GridFS delete, drop, or chunk-removal operation must be reachable by the authenticated user. Applications that validate or coerce identifiers to literal BSON types before driver calls are not affected. Unauthenticated exploitation is not supported by the CVSS vector. Default-safe usage patterns (passing a BSON::ObjectId literal directly) are not vulnerable. |
| Impact | The CVSS 4.0 score of 6.1 (Medium) reflects the interplay of a low confidentiality impact (VC:L, partial file disclosure) against high integrity and availability impacts (VI:H/VA:H), with the critical limiting factor being AT:P - a specific precondition must be present in the calling application. PR:L confirms only authenticated users are in scope; unauthenticated exploitation is not supported by the vector. There is no CISA KEV listing and no public POC, so exploitation probability is inferred from CVSS metrics alone without empirical confirmation. The availability dimension is the most operationally severe aspect: a single injected predicate against a delete path can silently wipe all chunks across an entire GridFS bucket, producing irreversible data loss rather than a recoverable confidentiality breach. Applications that strictly coerce identifiers to BSON::ObjectId or validated literal strings upstream of the driver call are not affected; only those that forward raw user-supplied structured input naively are exposed. Despite the medium CVSS score, any deployment where GridFS stores business-critical or user-generated files and exposes identifier parameters to application-level user input should treat remediation as a high operational priority due to the availability-destruction potential. |
| Exploit ScenarioDerived | An authenticated application user submits a crafted file identifier - such as a JSON payload containing a MongoDB query operator hash (e.g., {'$exists': true}) - to an application endpoint that retrieves or deletes a GridFS file. The MongoDB Ruby Driver forwards this structure as the identifier in a MongoDB query, which matches unintended documents. Depending on the operation reached, the attacker either reads file chunks belonging to other stored files or triggers deletion of all matching chunks across the entire GridFS bucket, causing complete and permanent loss of stored file content for all users. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 10, 2026
NoSQL query injection in the GridFS component of the MongoDB Ruby Driver allows an authenticated low-privileged user to exceed their intended file access scope. When an application passes a caller-influenced structured identifier - such as a Ruby Hash containing MongoDB query operators - to GridFS retrieval or deletion operations without coercing it to a literal BSON type, the driver forwards the structure directly to the MongoDB query layer, which interprets it as a query condition. Exploitation can yield unauthorized read access to stored GridFS file chunks belonging to other identifiers, or mass deletion of all chunks within the affected bucket, permanently rendering all stored files unreadable. No public exploit has been identified at time of analysis.
RemediationAI
Consult MongoDB JIRA ticket RUBY-3941 (https://jira.mongodb.org/browse/RUBY-3941) for the confirmed patched version of the MongoDB Ruby Driver and upgrade to that version as the primary fix; no specific patch version number has been confirmed from the available data. As an immediate compensating control, all application code paths that accept external input and pass it to GridFS operations should enforce strict type coercion - for example, calling BSON::ObjectId.from_string(id) and rescuing parse errors, or validating that the identifier is a plain String matching expected format - before it reaches the driver layer. Applications should reject any structured input (Hash, Array, or operator-containing objects) at the application boundary rather than relying on the driver to sanitize it. Where GridFS deletion is not a required user function, restricting the authenticated role to read-only GridFS operations limits the availability-destruction vector. Auditing all GridFS-interacting endpoints for unbounded identifier forwarding is essential regardless of patch status.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
MongoDB GridFS is a specification implemented by the MongoDB Ruby Driver (mongo gem) for storing files exceeding the 16 MB BSON document limit by splitting them into chunks across two collections (fs.files and fs.chunks). File operations use an identifier - typically a BSON::ObjectId - to locate the correct set of chunks. CWE-943 (Improper Neutralization of Special Elements in Data Query Logic) describes failures to distinguish between literal data values and query control structures. In MongoDB, a Hash passed as an identifier is interpreted as a query filter with operators (e.g., {'$exists': true}, {'$ne': nil}), rather than a scalar literal to match against the _id field. If the Ruby Driver's GridFS layer does not enforce coercion of the caller-supplied identifier to a strict BSON type before constructing the underlying query, any Ruby Hash reachable by an attacker can act as an injected query predicate. The issue is tracked at JIRA ticket RUBY-3941 (https://jira.mongodb.org/browse/RUBY-3941).
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
AC:H reflects the AT:P precondition (application must pass unsanitized structured identifiers); PR:L per authenticated requirement; I:H and A:H capture mass-deletion and chunk-destruction impact; C:L for partial unauthorized file disclosure.
Primary rating from Vendor (mongodb).
CVSS VectorVendor: mongodb
DescriptionCVE.org
Improper neutralization of special elements in data query logic in the GridFS component of the MongoDB Ruby 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.
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 |
|---|---|
| SUSE Liberty Linux 8 | Fixed |
EUVD-2026-75666
GHSA-4ww7-gqv6-mffc
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB