CVE-2026-96750: CWE-94: Improper Control of Generation of Code ('Code Injection') in MongoDB Compass
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.
AI Analysis
Technical Summary
MongoDB Compass improperly controls code generation by interpolating database names without escaping into its embedded MongoDB shell input. This allows a user with privileges to create databases on the connected server to inject code that is evaluated within the Compass process context when a Compass user opens the shell for the affected database. The vulnerability requires the Compass user to open the shell and the attacker to have database creation privileges on the server. This flaw is identified as CWE-94 (Improper Control of Generation of Code).
Potential Impact
Successful exploitation can lead to arbitrary code execution within the Compass process with the privileges of that process. This could allow an attacker to execute commands in the context of the Compass user, potentially leading to unauthorized actions or data compromise. However, exploitation requires the attacker to have database creation privileges on the connected server and the Compass user to open the shell for the affected database, limiting the attack vector.
Mitigation Recommendations
No official patch or fix information is provided in the vendor advisory or input data. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should exercise caution when opening the embedded shell in Compass, especially when connected to servers where untrusted users have database creation privileges. Avoid opening the shell for databases created by untrusted users.
CVE-2026-96750: CWE-94: Improper Control of Generation of Code ('Code Injection') in MongoDB Compass
Description
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.
CVSS v4.0
Score 7.3high
Affected software
MongoDB
Compass
pkg:github/mongodb-js/compassRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
MongoDB Compass improperly controls code generation by interpolating database names without escaping into its embedded MongoDB shell input. This allows a user with privileges to create databases on the connected server to inject code that is evaluated within the Compass process context when a Compass user opens the shell for the affected database. The vulnerability requires the Compass user to open the shell and the attacker to have database creation privileges on the server. This flaw is identified as CWE-94 (Improper Control of Generation of Code).
Potential Impact
Successful exploitation can lead to arbitrary code execution within the Compass process with the privileges of that process. This could allow an attacker to execute commands in the context of the Compass user, potentially leading to unauthorized actions or data compromise. However, exploitation requires the attacker to have database creation privileges on the connected server and the Compass user to open the shell for the affected database, limiting the attack vector.
Mitigation Recommendations
No official patch or fix information is provided in the vendor advisory or input data. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should exercise caution when opening the embedded shell in Compass, especially when connected to servers where untrusted users have database creation privileges. Avoid opening the shell for databases created by untrusted users.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- mongodb
- Date Reserved
- 2026-09-23T15:45:51.994Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ab549d5f7a7c54106846f21
Added to database: 09/24/2026, 16:03:33 UTC
Last enriched: 09/24/2026, 16:17:50 UTC
Last updated: 09/25/2026, 01:56:00 UTC
Views: 9
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.