Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-96750 Overview
CVE-2026-96750 affects MongoDB Compass, the official graphical client for MongoDB. The product interpolates a database name without escaping into the initial input of its embedded MongoDB shell. When a Compass user opens the shell from an affected database view, attacker-controlled content can be evaluated as shell input within the Compass process. The flaw is classified under CWE-94: Improper Control of Generation of Code. An attacker with privileges to create databases on a server that a Compass user connects to can abuse the issue to execute code with the privileges of the Compass process.
Critical Impact
A malicious database name can execute arbitrary shell commands inside MongoDB Compass when a user opens the embedded shell for that database.
Affected Products
- MongoDB Compass versions prior to v1.49.12
- Embedded MongoDB shell component within Compass
- Workstations running MongoDB Compass that connect to multi-tenant or shared MongoDB servers
Discovery Timeline
- 2026-09-24 - CVE-2026-96750 published to the National Vulnerability Database
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-96750
Vulnerability Analysis
MongoDB Compass embeds an interactive MongoDB shell that users can launch directly from a database view. When the shell initializes, Compass pre-populates the input buffer with context from the selected database, including the database name. The name is interpolated into shell input as a raw string without escaping or sanitization.
Because the embedded shell evaluates its input, any syntactically valid JavaScript or shell-command fragment contained in the database name is executed in the Compass process context. The attacker does not need to compromise the Compass workstation directly. Instead, they plant the payload on a shared MongoDB server by creating a database with a crafted name.
The vulnerability requires user interaction. The Compass user must open the shell on the attacker-controlled database for execution to occur. Exploitation yields code execution with the privileges of the local user running Compass, which typically includes access to local files, credentials, and network resources.
Root Cause
The root cause is improper control of code generation [CWE-94]. Compass constructs the shell's initial input by concatenating untrusted database identifiers into executable shell content. The code path omits identifier escaping, quoting, or validation before passing the string to the shell interpreter.
Attack Vector
An attacker with database creation privileges on a MongoDB server creates a database whose name contains shell syntax. When a Compass user connects to the server, browses to that database, and opens the embedded shell, Compass evaluates the malicious name as code. The attack is network-adjacent in the sense that the delivery channel is the MongoDB server, but execution occurs locally on the Compass client. See the MongoDB Compass v1.49.12 release notes for the fix details.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-96750
Indicators of Compromise
- MongoDB databases with unusual names containing JavaScript operators, backticks, quotes, parentheses, or newline characters
- Child processes spawned by the Compass executable that do not match normal shell command patterns
- Outbound network connections initiated by the Compass process to non-MongoDB endpoints
- File system writes or credential access by the Compass process shortly after a shell session is opened
Detection Strategies
- Audit MongoDB server metadata for database names containing non-alphanumeric characters that are not expected in your environment
- Monitor endpoint telemetry for process creation events where Compass.exe or the Compass binary is the parent of an interpreter or command process
- Review MongoDB audit logs for createDatabase or first-write operations originating from low-privilege accounts
Monitoring Recommendations
- Enable process-tree and command-line logging on workstations where MongoDB Compass is installed
- Alert on anomalous outbound connections or file access from the Compass process immediately after shell invocation
- Correlate MongoDB server audit events with endpoint telemetry to identify suspicious database creation followed by Compass sessions
How to Mitigate CVE-2026-96750
Immediate Actions Required
- Upgrade MongoDB Compass to version 1.49.12 or later on all workstations
- Inventory connected MongoDB servers and identify databases with suspicious or unexpected names
- Restrict database creation privileges on shared MongoDB clusters to trusted administrative accounts
- Instruct Compass users to avoid opening the embedded shell for unfamiliar databases until the patch is applied
Patch Information
MongoDB released the fix in Compass version v1.49.12. The patched build escapes database identifiers before interpolating them into shell input. Full release details are available in the MongoDB Compass v1.49.12 release notes.
Workarounds
- Do not open the embedded shell from the database view in Compass versions prior to 1.49.12
- Use the standalone mongosh client instead of the Compass embedded shell for interactive work
- Revoke createDatabase privileges from untrusted users on shared MongoDB deployments
- Review existing database names and rename or remove any that contain shell metacharacters
# Verify installed MongoDB Compass version
mongodb-compass --version
# On MongoDB server, list database names for review
mongosh --eval 'db.adminCommand({ listDatabases: 1 }).databases.map(d => d.name)'
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

