
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-18708 is a code injection vulnerability in MongoDB Server's JavaScript scripting engine that allows an authenticated user with write privileges to execute attacker-controlled code within the query scope of other users. The vulnerability is triggered through a specially crafted stored value processed during an internal maintenance cycle. Affected versions include MongoDB Server 7.0 before 7.0.40, 8.0 before 8.0.29, and 8.3.0 before 8.3.8. It was published on August 11, 2026, with a CVSS v3.1 base score of 6.4 (Medium) and a CVSS v4.0 base score of 5.3 (Medium) (GitHub Advisory).
The root cause is classified as CWE-94 (Improper Control of Generation of Code / Code Injection), where MongoDB's JavaScript scripting engine fails to properly isolate stored values from being evaluated as executable code during internal maintenance cycles (GitHub Advisory). An attacker with write access to a database can store a specially crafted value that, when processed by the maintenance cycle, executes within the JavaScript engine's sandbox in the context of other users' queries. Exploitation requires authenticated access with write privileges; no user interaction from the victim is needed. The attack is network-accessible and of low complexity, but impact is bounded by the scripting engine's sandbox, which does not expose database, filesystem, or network resources (GitHub Advisory).
Successful exploitation allows an authenticated attacker to corrupt query results for other users sharing the same database instance and to cause denial of service targeting their database operations. The impact is confined to the JavaScript scripting engine's execution sandbox — there is no access to underlying database files, the filesystem, or network resources, limiting confidentiality impact to none. Integrity and availability are both assessed as low, affecting only the vulnerable system's query processing rather than enabling broader lateral movement or data exfiltration (GitHub Advisory).
As of the publication date, there is no known public proof-of-concept exploit and no evidence of active in-the-wild exploitation (GitHub Advisory). The EPSS score is approximately 0.284% (21st percentile), indicating a low near-term probability of exploitation. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. NVD SSVC assessment classifies exploitation as "none" and the attack as non-automatable.
db.collection.insertOne() or db.collection.updateOne()).mongod.log) during maintenance cycle execution; unusual query result anomalies reported by multiple users on the same database instance.MongoDB has released patched versions addressing this vulnerability: 7.0.40, 8.0.29, and 8.3.8. Users should upgrade to these versions as the primary remediation (GitHub Advisory). As interim workarounds, restrict write privileges to only trusted and verified users, apply the principle of least privilege for all database accounts, and consider isolating critical databases to separate MongoDB instances where write access cannot be sufficiently controlled. Monitor for unusual query patterns or anomalies during maintenance cycles as a detection measure.
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."