Incident response on call, 24/7: +385 98 1900 984NewIR Retainer: a team on contract before an attack
HR · EN
High 8.2CVE-2026-135227

Mongoid (MongoDB Ruby) – improperly restricted object attributes in belongs_to assignment

Published 25/11/2026 · Updated 25/11/2026 · MongoDB Ruby Driver

Summary

A vulnerability (CWE-915) in the association handling of the Mongoid ODM library allows structured input supplied in place of a simple identifier value to be turned into an object treated as an already-stored record of an attacker-chosen model class. Affected versions are 9.1.0 up to, but not including, 9.1.3.

Per the CVSS vector (score 8.2, high), the attack is network-based, low complexity, requires no authentication and no user interaction. The precondition is that the application passes unfiltered request data into the affected association handling (belongs_to).

An attacker may cause unintended modification or deletion of stored records (high integrity impact) and render an individual record unreadable through that association (low availability impact). There is no confidentiality impact. The vulnerability is not listed in the CISA KEV catalog.

Who is affected

Organizations developing or running Ruby applications using Mongoid 9.1.0 up to before 9.1.3, especially those assigning HTTP request data directly to belongs_to associations.

What to do

  1. Upgrade Mongoid to version 9.1.3 or later.
  2. Check Gemfile.lock (e.g. bundle list | grep mongoid) to identify the version used across all applications.
  3. Review code where request parameters are passed into belongs_to associations and enforce filtering (e.g. strong parameters) so only scalar identifiers are accepted.
  4. Follow the vendor's official advisory (https://jira.mongodb.org/browse/MONGOID-5969) for further details.

Affected products and versions

MongoDB Ruby Driver9.1.0 – < 9.1.3Fixed in: 9.1.3

CVSS vector, explained

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L

Attack vector
Network (from the internet)
Attack complexity
Low
Privileges required
None (no login)
User interaction
Not required
Scope
Vulnerable component only
Confidentiality
None
Integrity
High impact
Availability
Low impact

Weakness type (CWE)

  • CWE-915 Improperly Controlled Modification of Dynamically-Determined Object Attributes

References

Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.