Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Network-reachable mongod, low-complexity query, authenticated read role required (PR:L); high confidentiality from memory disclosure and high availability from crash, but no integrity impact described.
Primary rating from Vendor (mongodb).
CVSS VectorVendor: mongodb
Lifecycle Timeline
2DescriptionCVE.org
A use-after-free vulnerability exists in MongoDB Server's server-side JavaScript engine when converting BSON documents to JavaScript arrays. An authenticated user with read privileges who is able to run server-side JavaScript (for example, via $where or $function) can cause the server to access memory that has already been freed. This may result in disclosure of information from the mongod process memory or a denial of service through a server crash.
AnalysisAI
Memory disclosure and denial of service in MongoDB Server's server-side JavaScript engine allow an authenticated user with read privileges and JavaScript execution rights to read freed heap memory or crash the mongod process. The flaw is triggered during BSON-to-JavaScript array conversion when operators such as $where or $function are evaluated. No public exploit identified at time of analysis, and the issue is not listed in CISA KEV; it was self-reported by MongoDB.
Technical ContextAI
MongoDB embeds a server-side JavaScript engine (historically SpiderMonkey) that converts BSON documents - MongoDB's binary serialization format - into native JavaScript values so query predicates like $where and aggregation $function can operate on them. The bug lives in the BSON-to-JS array conversion path, where an object reference is freed but subsequently dereferenced. NVD assigns CWE-787 (out-of-bounds write), but the description explicitly characterizes the root cause as a use-after-free (CWE-416); the practical effect is the same class of C/C++ memory-safety bug in the conversion routine, leaking adjacent heap contents or causing a fatal access violation in mongod.
RemediationAI
No vendor-released patch identified at time of analysis in the provided data - track https://jira.mongodb.org/browse/SERVER-128125 for the fixed build numbers across the 6.0, 7.0, and 8.x release lines and upgrade as soon as MongoDB publishes them. As a compensating control, disable server-side JavaScript execution by starting mongod with security.javascriptEnabled: false (or --noscripting), which blocks $where, $function, $accumulator and mapReduce JavaScript and prevents reaching the vulnerable conversion path; the trade-off is that applications relying on those operators will break and must be rewritten to use aggregation pipeline equivalents. Where JavaScript cannot be disabled, revoke the find/read role from accounts that do not strictly need it and audit roles granting JavaScript-capable operators, since PR:L means any authenticated reader who can issue $where is sufficient to trigger the bug.
MongoDB before 2.0.9 and 2.2.x before 2.2.4 does not properly validate requests to the nativeHelper function in SpiderMo
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
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
All versions of bson before 1.1.4 are vulnerable to Deserialization of Untrusted Data. Rated critical severity (CVSS 9.8
Memory corruption in the MongoDB BI Connector ODBC Driver (fixed in v1.4.9) occurs when an oversized catalog, schema, or
Same weakness CWE-787 – Out-of-bounds Write
View allSame technique Buffer Overflow
View allVendor StatusVendor
Debian
| Release | Status | Fixed Version | Urgency |
|---|---|---|---|
| (unstable) | fixed | (unfixed) | - |
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-36373
GHSA-x5xf-rwjm-436w