Cleartext storage of encrypted foreign key fields in Mongoid
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- Low · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-312.
Summary
MongoDB Ruby Driver versions from 9.0.0 before 9.1.3 are affected through the Mongoid object-document mapper. Mongoid may leave a field out of the client-side encryption settings it generates for a collection when that field is also used as a reference to another record, so the value is stored in readable form (CWE-312). An attacker with ordinary authenticated read access to the affected collection can view data that was meant to be protected.
Written with Claude Haiku 5.5 from the sources below · 2026-11-25
Description from the CNA
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Upgrade MongoDB Ruby Driver to version 9.1.3, which fixes the issue.
Written with Claude Haiku 5.5 from the sources below · 2026-11-25
- Fix · CNA Ruby Driver (MongoDB) Fixed in 9.1.3
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
MongoDB Ruby Driver 9.1.3
6 records Highest priority Priority MEDIUM 1 MEDIUM, 5 LOW
Other records, highest priority first
- TI-2026-98380 Improper restriction of object attributes in Mongoid belongs_to assignmentPriority MEDIUM 43
- TI-2026-98378 Incorrect authorization from a discarded default scope in MongoidPriority LOW 38
- TI-2026-98374 Cleartext storage of encrypted embedded fields in MongoidPriority LOW 31
Timeline
- 2026-11-25 Threatist record created from CVE-2026-135140
- 2026-11-25 Alias added: GHSA-qwcj-f6jg-p4gj
References
More MongoDB vulnerabilities
- TI-2019-08023 Remote code execution in mongo-express via toBSON endpoints KEVCVSS 3.1CRITICAL 9.9
- TI-2025-13542 Zlib header length mismatch in MongoDB Server allows memory read KEVCVSS 4.0HIGH 8.7
- TI-2026-89295 MongoDB Server Missing Authorization Check in Replication Administrative Command CVSS 4.0HIGH 8.6
- TI-2026-89289 Incorrect authorization in MongoDB Server allows admin access CVSS 4.0HIGH 8.6
- TI-2026-79432 BSON output corruption via out-of-range binary subtype in MongoDB C# Driver CVSS 4.0MEDIUM 6.9
- TI-2026-79424 NoSQL command injection via mismatched BSON length in MongoDB C# Driver CVSS 4.0MEDIUM 6.9
Sources
- CVE-2026-135140 · CVE Program
- CVE-2026-135140 · NVD
- FIRST EPSS
- GHSA-qwcj-f6jg-p4gj · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences