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

Mongoid (MongoDB Ruby): authorization bypass via discarded default scope

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

Summary

A logic flaw in the query-building layer of the Mongoid object-document mapper (MongoDB Ruby) causes a model-level default restriction (default scope) that is meant to return no records to be silently discarded when combined into a query. This is an incorrect authorization issue (CWE-863). Versions 4.0.0 up to, but not including, 9.1.3 are affected.

Per the CVSS vector (8.1, High), the attack is carried out over the network with low complexity. It requires only basic application privileges and no interaction from another user. An ordinary request is enough.

An attacker may read, change or remove records the restriction was intended to withhold. Confidentiality and integrity impact is high, with no availability impact. The vulnerability is not listed in CISA KEV and no EPSS data is available.

Who is affected

Organizations building or running Ruby/Rails applications with Mongoid 4.0.0 up to, but not including, 9.1.3, especially those that rely on default scopes to restrict data access.

What to do

  1. Upgrade Mongoid to version 9.1.3 or later.
  2. Check the installed version in Gemfile.lock, e.g. with bundle list | grep mongoid.
  3. Review models that use default scopes for access restriction, especially those returning no records. Also add explicit authorization checks in the application layer.
  4. Review data access and change logs for unauthorized reading, modification or deletion of protected records.
  5. See the official ticket MONGOID-6025 (jira.mongodb.org) for details.

Affected products and versions

MongoDB Ruby Driver4.0.0 – < 9.1.3Fixed in: 9.1.3

CVSS vector, explained

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

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

Weakness type (CWE)

References

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