CVE-2026-135138: Improper restriction of read-only attributes with dotted keys in Mongoid
Mongoid does not consistently apply its read-only attribute protection when attribute names are supplied dynamically by the caller. In an application that forwards caller-supplied attribute names into a document update, a user with basic application privileges may change values held inside a field the model declared immutable. This may result in unintended modification of data the application treats as trusted, such as flags used for its own access decisions.
Affected Software
Event History
Frequently Asked Questions
Who is realistically exposed to this issue?
Applications using Mongoid are exposed when they pass caller-supplied attribute names into document updates and rely on Mongoid read-only attributes to prevent changes. A user with basic application privileges may then be able to alter values within fields the application considers immutable.
What does an attacker need to exploit it?
The attacker needs basic application privileges and a path that forwards caller-controlled attribute names into a Mongoid document update. No user interaction is required.
What is the potential impact?
An attacker may modify data inside a field declared immutable by the model. This can affect application-trusted values, including flags used for access-control decisions.