Skip to main content

Mongoid EUVDEUVD-2026-83214

| CVE-2026-93759 HIGH
Code Injection (CWE-94)
2026-09-18 mongodb GHSA-vr6j-ghpr-hmgf
8.8
CVSS 4.0 · Vendor: mongodb
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify app endpoint feeding user input to Mongoid query
  2. Delivery
    Submit crafted JavaScript-expression string criterion
  3. Exploit
    Mongoid passes value to DB as server-side JS
  4. Execution
    DB engine evaluates attacker code
  5. Impact
    Disclose stored fields / skew document selection / degrade performance

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

Requires a Mongoid-based application that forwards an externally-influenced value into a string-typed query criterion, which Mongoid then relays to MongoDB as a server-side JavaScript expression (a $where-style predicate) rather than a coerced/typed operator. Exploitation also requires the MongoDB deployment to permit server-side JavaScript evaluation. Limiting factors: the vulnerability is not reachable in default query-building patterns that use typed/hash criteria - it depends on the application accepting raw string criteria from untrusted input, which is an integration-specific condition rather than an out-of-the-box remote flaw.

Impact

The vendor CVSS 4.0 vector (8.8, AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:L) rates this high-severity and network-exploitable without privileges, and CWE-94 (Code Injection) frames it as code evaluation in the database engine. However, the true risk is heavily gated: the description states the flaw triggers when 'an unauthenticated party able to influence the value an application supplies as a query argument' passes a string criterion - meaning exploitation depends on a downstream Mongoid-based application forwarding untrusted input directly into a string-typed query criterion that Mongoid then relays as a server-side JavaScript expression ($where-style). That is an application-integration prerequisite the vendor's AT:N does not capture; I assess AT:P / AC:H. No EPSS score, no CISA KEV listing, and no public proof-of-concept were provided - this is 'no public exploit identified at time of analysis.' The 'RCE' tag overstates impact: evaluation occurs inside the MongoDB JavaScript engine (sandboxed to DB context), not OS-level remote code execution, which is consistent with the vendor's own low VI:L/VA:L integrity/availability impact. Net: a genuine injection issue worth patching, but real-world risk is contingent on how consuming apps build queries, not a universally remotely-exploitable default-config bug.

Exploit ScenarioDerived

A web application built on Mongoid takes a user-supplied parameter (e.g., a search field) and passes it as a string query criterion without type coercion. An unauthenticated attacker submits a crafted JavaScript expression that Mongoid relays to MongoDB as a server-side JS predicate, causing the DB engine to evaluate attacker-chosen logic to read stored field values or force document selection. No public PoC was provided in the source data.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 18, 2026

Code injection in Mongoid allows unauthenticated attackers who can influence a query argument to execute arbitrary JavaScript in the MongoDB server via a string-typed query criterion, leading to disclosure of stored field values, unintended document selection for writes, and reduced database performance. The vulnerability affects Mongoid versions 8.0.0 through 8.0.12, 8.1.0 through 8.1.12, 9.0.0 through 9.0.11, and 9.1.0, but exploitation requires the application to pass externally influenced string criteria to the query builder and the MongoDB deployment to permit server-side JavaScript evaluation. No public exploit identified at time of analysis.

RemediationAI

No vendor-released patch identified at time of analysis; monitor the MongoDB Jira issue at https://jira.mongodb.org/browse/MONGOID-5993 for updates. As a compensating control, disable server-side JavaScript evaluation in MongoDB by setting security.javascriptEnabled to false or starting the server with --noscripting, which blocks the $where and $function operators and mapReduce JavaScript execution; trade-off: this breaks applications that rely on those features. Ensure Mongoid-based applications never pass raw string criteria from untrusted input to query methods; instead use typed or hash criteria and validate or whitelist any externally influenced query arguments. Additionally, restrict network access to MongoDB instances to trusted clients to reduce exposure.

Affected VersionsENISA

Mongoid 8.0.0 ≤8.0.12
Mongoid 9.1.0
Mongoid 9.0.0 ≤9.0.11
Mongoid 8.1.0 ≤8.1.12

Affected Packages

euvd mongoid no fix

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

Mongoid is a Ruby object-document mapper (ODM) for MongoDB. The flaw, classified as CWE-94 code injection, arises because Mongoid does not neutralize string-typed query criteria and instead relays them to MongoDB as server-side JavaScript expressions, such as a $where predicate, rather than coercing them into safe typed operators. This allows any party who can influence the query argument to inject JavaScript that the database engine evaluates. The underlying issue depends on application integration: default query-building patterns that use typed or hash criteria are not vulnerable. Affected CPE is cpe:2.3:a:mongodb_inc.:mongoid:*:*:*:*:*:*:*:*; specific affected versions per ENISA EUVD are 8.0.0 through 8.0.12, 8.1.0 through 8.1.12, 9.0.0 through 9.0.11, and 9.1.0. MongoDB must have server-side JavaScript enabled for exploitation, which is common but can be disabled. The vendor CVSS 4.0 score is 8.8 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:L), while our independent assessment using CVSS 3.1 yields AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:L, reflecting the integration-specific exploitation condition.

Know when Mongoid 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

Vendor (mongodb) PRIMARY 8.8 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:L/SC:N/SI:N/SA:N
vuln.today AI 7.0 HIGH

AC:H because exploitation requires the app to route untrusted input into a string query criterion and the DB to allow server-side JS; C:H for field disclosure, I:L/A:L for skewed write selection and perf degradation.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:L
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:L/SC:N/SI:N/SA:N
Red Hat 8.6 HIGH

Primary rating from Vendor (mongodb).

CVSS VectorVendor: mongodb

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Organizations using affected versions of the Mongoid Ruby library (8.0.0 through 8.0.12, 8.1.0 through 8.1.12, 9.0.0 through 9.0.11, and 9.1.0) face a high-severity security flaw that could lead to unauthorized exposure of stored database fields, unintended document modifications, and degraded database performance. No vendor-released patch identified at time of analysis, and no public exploit identified at time of analysis. Leadership should prioritize identifying vulnerable applications and implementing compensating controls to protect sensitive data and maintain service availability.

Business Impact: High
Compensating Controls

Disable server-side JavaScript execution in MongoDB (e.g., security.javascriptEnabled=false), enforce strict input validation and parameterized queries for all Mongoid criteria, restrict database user privileges to least privilege, and monitor database logs for anomalous JavaScript execution or unusual document access.

Threat Intelligence Overview

EPSS Score
0.2%
Top 84% exploitable
Prevalence
Medium
official MongoDB Ruby ODM, but exploit path is narrow server-side-JS query use
Exploit
POC
Public exploit code exists
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

64
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

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.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy