Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain DB-create rights on target server
-
DeliveryCreate database with malicious shell-payload name
-
ExploitVictim opens Compass shell for that database
-
ExecutionName interpolated unescaped into shell input
-
PersistPayload evaluated as code in Compass process
-
ImpactAchieve RCE with victim's privileges
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires all of the following: (1) the attacker holds privileges to create databases on a MongoDB server that a Compass user connects to (PR:L); (2) the attacker names a database so that shell syntax is embedded in it; and (3) the victim Compass user must navigate to that database's view AND explicitly open the embedded MongoDB shell from it (UI:A). Code then executes only within the Compass process with that process's/user's privileges - not on the server. Limiting factors: the required create-database privilege, the mandatory and specific user action of opening the shell for the exact affected database, and 'specific conditions' the vendor notes but does not fully detail, together producing the High attack complexity. Fixed in Compass v1.49.12. |
| Impact | This is a MongoDB-reported code-injection (CWE-94) flaw in MongoDB Compass, the official desktop GUI client. The CVSS 4.0 score of 7.3 (High) rests on network vector but High attack complexity (AC:H), low privileges required (PR:L - the attacker must hold create-database rights on a server the victim connects to), and active user interaction (UI:A - the Compass user must explicitly open the embedded shell from the malicious database's view). No EPSS score, no CISA KEV listing, and no public proof-of-concept were provided, so this is 'no public exploit identified at time of analysis.' Real-world risk is moderate rather than urgent: exploitation is gated behind several independent preconditions (attacker holding DB-create privileges, the victim navigating to that specific database, and the victim choosing to open the shell), which is why complexity is High and why this is a targeted/opportunistic scenario, not a mass-exploitable vulnerability. The signals are internally consistent - a High-CVSS technical impact (full VC/VI/VA on the Compass process) tempered by strong exploitation conditions. This is a genuine RCE-class bug worth patching promptly for organizations that let semi-trusted or lower-privileged users create databases on shared servers accessed by Compass, but the absence of exploitation evidence and the interaction requirement keep it below drop-everything priority. |
| Exploit ScenarioDerived | An attacker with create-database privileges on a shared MongoDB server crafts a database whose name embeds shell syntax. When a higher-privileged Compass user browses to that database and opens the embedded MongoDB shell from its view, the unescaped database name is interpolated into the shell's initial input and evaluated as code within the Compass process, running with that user's OS privileges. No public exploit code is currently identified. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 24, 2026
Code injection in MongoDB Compass lets an attacker who holds database-creation privileges on a MongoDB server interpolate unescaped shell syntax into the initial input of Compass's embedded MongoDB shell; when a victim user navigates to that database's view and explicitly opens the shell from it, the injected content is evaluated inside the Compass client process with that process's privileges. Exploitation is constrained: the attacker must be able to create databases on the connected server and name one maliciously, and the victim must perform the specific action of opening the shell for exactly that database, which is why the issue carries High attack complexity despite the 7.3 severity. Execution is confined to the Compass client process and does not reach the MongoDB server; Compass v1.49.12 is the fixed release, and no public exploit code or active exploitation (CISA KEV) has been identified at time of analysis.
RemediationAI
Upgrade MongoDB Compass to v1.49.12 or later, the vendor-released fixed version (release notes: https://github.com/mongodb-js/compass/releases/tag/v1.49.12). Because the injection is entirely client-side, server hardening alone does not remove the risk; the primary fix is patching the Compass client on every workstation that connects to shared or multi-tenant MongoDB servers. Where immediate upgrade is not possible, compensating controls include restricting database-creation privileges on shared MongoDB deployments to trusted administrators (trade-off: reduces self-service/provisioning flexibility for developers and application teams), mandating that analysts do not open the embedded shell from database views whose names contain shell metacharacters such as backticks, semicolons, quotes, or parentheses (trade-off: relies on user vigilance and slightly slows shell-based troubleshooting, since the shell can still be launched against a known-safe database and the target switched with a manually typed use command), and auditing database names for suspicious shell-like syntax on servers that untrusted users can write to. Note that the mandatory user action of opening the shell for the affected database is the trigger, so blocking or discouraging that specific workflow for untrusted databases reduces exposure but is not a substitute for the v1.49.12 patch.
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
The flaw is a CWE-94 code-injection issue in MongoDB Compass, the official Electron-based desktop GUI client for MongoDB. Compass ships an embedded MongoDB Shell (mongosh-style) integration that, when a user opens the shell from a database's view, prefills the shell's initial input with a use <database>-style statement. That statement is built by string interpolation of the database name without escaping, and MongoDB permits shell-meaningful characters (such as backticks, semicolons, parentheses, and quotes) in database names. Because the constructed string is subsequently evaluated as shell input inside the Compass process, a database name crafted with embedded JavaScript/shell syntax is executed with the privileges of the Compass client process on the victim's workstation, not with server-side privileges. The CVSS:4.0 vector (AV:N/AC:H/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H) and the independently assessed CVSS:3.1 vector (AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H) both reflect this: network-reachable trigger, low-privilege authenticated actor on the connected MongoDB deployment, and mandatory user interaction, with high confidentiality, integrity, and availability impact limited to the Compass process scope (subsequent system impact rated None). The CPE cpe:2.3:a:mongodb:compass:*:*:*:*:*:*:*:* confirms all pre-fix Compass releases are in scope.
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:H/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Attacker reaches the shared server over the network (AV:N) but needs DB-create rights (PR:L), victim must open the shell (UI:R), and multiple preconditions raise complexity (AC:H); code runs in-process (S:U) with full CIA impact.
Primary rating from Vendor (mongodb).
CVSS VectorVendor: mongodb
Lifecycle Timeline
2DescriptionCVE.org
MongoDB Compass can interpolate a database name without escaping into the initial input of its embedded MongoDB shell when a user opens the shell from that database's view. A user with privileges to create databases on a server that a Compass user connects to may, under specific conditions, have content evaluated as shell input within the Compass process, with that process's privileges. This requires the Compass user to open the shell for the affected database.
Articles & Coverage 2
Executive ViewAI
MongoDB Compass, a client used by developers and database administrators to manage MongoDB, contains a high-severity code-injection vulnerability that could allow a user with database-creation rights to execute code on another user's workstation when that user opens the embedded shell for a maliciously named database. This puts local credentials, development data, and potentially broader network access at risk for affected users, though exploitation requires specific privileges and victim interaction. Leadership should prioritize remediation because the issue is rated High and can compromise endpoints, while no public exploit identified at time of analysis.
Apply vendor patch (Compass v1.49.12) if confirmed available; otherwise restrict database-creation privileges to trusted administrators and prohibit opening the embedded shell from untrusted databases.
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
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
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
EUVD-2026-86260
GHSA-g679-8jm6-pqf7
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB