CVE-2026-135140 in Mongoidinfo

Summary

by MITRE • 11/25/2026

Mongoid may omit a field from the client-side encryption settings it generates for a collection when that same field is also used as a reference to another record. The value is then stored in readable form instead of encrypted, and the application receives no indication that this has happened. A party with ordinary authenticated read access to the affected collection may be able to view data that was intended to be protected.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 11/25/2026

The vulnerability described involves a critical flaw in how Mongoid handles client-side encryption settings when specific field configurations intersect with database reference relationships. In secure application architectures, sensitive data fields are often designated for automatic encryption using libraries such as MongoDB Client-Side Field Level Encryption. This mechanism ensures that plaintext values never touch the storage layer, remaining encrypted at rest and during transit to authorized processes only. However, a logical error occurs when a field is simultaneously configured for client-side encryption and defined as a reference or foreign key pointing to another document within the database schema. In this specific scenario, Mongoid fails to include the field in the generated encryption policy metadata sent to the driver. Consequently, the application proceeds without encrypting the value of that field, storing it in plaintext on disk despite the developer's explicit intent to protect it.

This oversight creates a significant security gap because the failure is silent and non-obvious. The application does not throw an exception or log a warning indicating that encryption was bypassed for this specific field. Developers may assume their sensitive data is protected based on configuration files, while in reality, the data resides in clear text within the database collection. This lack of feedback prevents immediate detection during development or testing phases, allowing the vulnerability to persist into production environments where it poses a direct risk to confidentiality requirements.

The operational impact of this flaw is severe for organizations relying on strict compliance with data protection regulations such as GDPR, HIPAA, or PCI-DSS. An attacker who gains authenticated read access to the database can directly query and view these plaintext fields without needing to decrypt them using application keys. This effectively nullifies the security controls intended by the encryption policy. The exposure of sensitive identifiers, personal information, or financial data through this mechanism undermines trust in the system's integrity and may lead to regulatory fines, legal liability, and reputational damage.

From a classification perspective, this issue aligns with CWE-200: Information Exposure, as it results in the unintended disclosure of sensitive information due to improper configuration handling. It also relates to CWE-916: Improper Control Generation for Code Execution if one considers that misconfigured security controls can lead to broader exploitation vectors. In terms of MITRE ATT&CK techniques, this vulnerability facilitates Data from Information Repositories (T1005), allowing adversaries to exfiltrate data without triggering typical intrusion detection alerts associated with decryption key theft or brute-force attacks.

Mitigation strategies must focus on both immediate remediation and long-term architectural improvements. First, developers should audit all fields defined as references in Mongoid models to ensure they are not simultaneously marked for client-side encryption if the library does not support such dual usage. If a field requires both referencing capabilities and high-level confidentiality, alternative design patterns should be employed, such as storing encrypted tokens or hashes instead of direct document IDs where feasible. Second, implementing comprehensive logging and monitoring for database operations can help detect anomalies in data storage formats. Finally, organizations should adopt automated security testing tools that validate encryption policies against actual schema definitions to catch configuration mismatches before deployment. Regular penetration testing focused on data access controls will also help identify any residual exposure resulting from such logical flaws.

Responsible

Mongodb

Reservation

11/23/2026

Disclosure

11/25/2026

Moderation

accepted

CPE

ready

EPSS

0.00168

KEV

no

Activities

low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!