CVE-2026-93759: CWE-94: Improper Control of Generation of Code ('Code Injection') in MongoDB Inc. Mongoid
Mongoid does not neutralize a string-typed query criterion supplied to its query builder, and instead passes it to the database as a server-side JavaScript expression. An unauthenticated party able to influence the value an application supplies as a query argument may cause code of their choosing to be evaluated by the database engine. This may result in unintended disclosure of stored field values, unintended selection of documents for application-initiated writes, and reduced database performance.
AI Analysis
Technical Summary
Mongoid fails to sanitize string-typed query criteria before passing them to the database as server-side JavaScript expressions. This improper control of code generation (CWE-94) enables unauthenticated attackers who can influence query arguments to inject and execute arbitrary code within the database engine. The vulnerability can lead to unintended data disclosure, unauthorized document modifications, and performance issues in the database.
Potential Impact
An unauthenticated attacker able to control query arguments may cause arbitrary code execution on the database server. This can result in unintended disclosure of stored field values, unauthorized selection of documents for application-initiated writes, and reduced database performance. No known exploits in the wild have been reported.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided in the available data. Until a fix is available, applications should avoid passing untrusted input as string-typed query criteria to Mongoid's query builder to prevent code injection.
CVE-2026-93759: CWE-94: Improper Control of Generation of Code ('Code Injection') in MongoDB Inc. Mongoid
Description
Mongoid does not neutralize a string-typed query criterion supplied to its query builder, and instead passes it to the database as a server-side JavaScript expression. An unauthenticated party able to influence the value an application supplies as a query argument may cause code of their choosing to be evaluated by the database engine. This may result in unintended disclosure of stored field values, unintended selection of documents for application-initiated writes, and reduced database performance.
CVSS v4.0
Score 8.8high
Affected software
MongoDB Inc.
Mongoid
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Mongoid fails to sanitize string-typed query criteria before passing them to the database as server-side JavaScript expressions. This improper control of code generation (CWE-94) enables unauthenticated attackers who can influence query arguments to inject and execute arbitrary code within the database engine. The vulnerability can lead to unintended data disclosure, unauthorized document modifications, and performance issues in the database.
Potential Impact
An unauthenticated attacker able to control query arguments may cause arbitrary code execution on the database server. This can result in unintended disclosure of stored field values, unauthorized selection of documents for application-initiated writes, and reduced database performance. No known exploits in the wild have been reported.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided in the available data. Until a fix is available, applications should avoid passing untrusted input as string-typed query criteria to Mongoid's query builder to prevent code injection.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- mongodb
- Date Reserved
- 2026-09-18T16:51:38.630Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6aadb77055bf5e2cf59e6400
Added to database: 09/18/2026, 22:13:04 UTC
Last enriched: 09/18/2026, 22:14:42 UTC
Last updated: 09/19/2026, 01:46:23 UTC
Views: 4
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.