
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-13078 is a file disclosure vulnerability in MongoDB Server caused by the server-side MozJS (SpiderMonkey) scripting engine unconditionally registering a module loading hook that enables JavaScript calls to read arbitrary files from the host filesystem using the mongod process's privileges. An authenticated user can exploit this through crafted aggregation pipeline commands to access sensitive files on the server. Affected versions include MongoDB Server 7.0 before 7.0.39, 8.0 before 8.0.28, 8.2.0 before 8.2.12, and 8.3.0 before 8.3.7. The vulnerability was published on July 22, 2026, and carries a CVSS v3.1 base score of 7.7 (High) and a CVSS v4.0 base score of 6.3 (Medium) (GitHub Advisory, EUVD).
The root cause is classified as CWE-862 (Missing Authorization): the MozJS scripting engine within MongoDB's server-side JavaScript execution environment unconditionally registers a module loading hook without enforcing proper authorization controls, allowing it to be invoked by any authenticated database user (GitHub Advisory). An attacker with valid database credentials can craft aggregation pipeline commands that invoke JavaScript via the $function or similar operators, leveraging the registered hook to call Node-style require() or equivalent module loading mechanisms to read arbitrary files from the filesystem with the privileges of the mongod process. The attack vector is network-based, requires low privileges (authenticated access), no user interaction, and no special attack complexity or requirements. No public proof-of-concept code has been identified at this time (Feedly).
Successful exploitation allows an authenticated attacker to read arbitrary files accessible to the mongod process on the host filesystem, potentially exposing sensitive data such as configuration files, private keys, credentials, /etc/passwd, application secrets, or other files within the process's read permissions. The impact is limited to confidentiality — there is no integrity or availability impact on the vulnerable system itself, though the subsequent system confidentiality impact is rated High due to the potential for sensitive data exposure beyond the database (GitHub Advisory). If MongoDB is running with elevated OS privileges, the scope of file disclosure could be significant and may facilitate lateral movement or privilege escalation in broader environments.
mongo shell or a MongoDB driver with the obtained credentials.$function or mapReduce) and leverages the unconditionally registered MozJS module loading hook to call file-reading functionality./etc/passwd, MongoDB configuration files, TLS private keys, or application credential files) using the privileges of the mongod process.aggregate) with embedded JavaScript ($function, $where, or mapReduce) from non-administrative users; repeated access to collections not typically queried by the connecting user.mongod process accessing sensitive OS files (e.g., /etc/passwd, /etc/shadow, TLS certificate/key files, application config files) — detectable via OS-level file access auditing (e.g., auditd on Linux with -w /etc/passwd -p r).mongod.log as unusual aggregation queries with JavaScript payloads.MongoDB has released patched versions addressing this vulnerability: 7.0.39, 8.0.28, 8.2.12, and 8.3.7 — upgrading to these versions is the primary recommended remediation (GitHub Advisory, MongoDB JIRA). As interim mitigations, restrict database access to trusted and necessary users only, enforce the principle of least privilege for MongoDB accounts, and disable server-side JavaScript execution if not required (using --noscripting or security.javascriptEnabled: false in the configuration). Implement network segmentation to limit access to MongoDB instances from only authorized application servers, and monitor aggregation pipeline queries for suspicious JavaScript-based file access patterns.
The vulnerability was noted on Mastodon by The Hacker Wire shortly after disclosure on July 22, 2026 (Mastodon). The GitHub Advisory Database has classified it as Moderate severity and it has been indexed by multiple CVE tracking services. No significant vendor statements beyond the MongoDB JIRA ticket or major media coverage have been identified at this time.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."