Mongoid: Use of Externally-Controlled Input to Select Classes or Code
CVE-2026-93765 is a critical-severity use of externally-controlled input to select classes or code vulnerability in Mongoid from MongoDB, with a CVSS 3.1 base score of 9.1 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected Mongoid versions: 9.1.0; 9.0.0 through 9.0.11; 8.1.0 through 8.1.12, and others listed below. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.51% chance of exploitation within 30 days, which is low compared with other CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Check which version of Mongoid you run against the affected versions below, and install the vendor's latest release.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| MongoDB | Mongoid | 9.1.0; 9.0.0 through 9.0.11; 8.1.0 through 8.1.12; 8.0.0 through 8.0.12 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- NoneNo data is disclosed.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H. Scored by CNA (mongodb.com).
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 4.0 | 8.3 | High | CNA (mongodb.com) |
| CVSS 3.1 | 9.1 | Critical | CNA (mongodb.com) |
Official description
Mongoid contains an unsafe reflection weakness in the document persistence layer of its object-document mapping code. Input whose keys are passed through from an unauthenticated party by an embedding application can cause unintended internal method invocation instead of the intended array field update. This may result in unintended removal of stored records and in the embedding application becoming unresponsive.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Use of Externally-Controlled Input to Select Classes or Code
The product uses external input with reflection to select which classes or code to use, but it does not sufficiently prevent the input from selecting improper classes or code.
How developers prevent this class of flaw
- Refactor your code to avoid using reflection.
- Do not use user-controlled inputs to select and load classes or code.
- Apply strict input validation by using allowlists or indirect selection to ensure that the user is only selecting allowable classes or code.
More Use of Externally-Controlled Input to Select Classes or Code vulnerabilities (CWE-470)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Other references
- jira.mongodb.org/browse/MONGOID-5973Permissions Required
Other vulnerabilities in Mongoid
- 9.8 Critical severity
- 7.5 High severity
- 8.2 High severity
- 8.6 High severity
- 8.1 High severity
Recent Use of Externally-Controlled Input to Select Classes or Code vulnerabilities
- 8.8 High severity
- 7.5 High severity
- 8.8 High severity
- 8.5 High severity
- 8.8 High severity
- 8.8 High severity
Spotted an error? Tell us.