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

MongoDB BSON for Ruby: type confusion in DBPointer handling in Extended JSON parser

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

Summary

A type-confusion weakness (CWE-843) in the Extended JSON parsing component of BSON for Ruby (MongoDB Ruby Driver) allows a party who can supply parser input to influence how a serialized document is framed. Content placed in one value may be read back as additional or replacement document fields.

Per the CVSS vector (7.5, high), the attack is network-based, low complexity, and requires no authentication or user interaction. The impact is on integrity: if an application parses untrusted Extended JSON and stores the result, an attacker may cause unintended modification of stored data. Confidentiality and availability are not affected. The vulnerability is not listed in the CISA KEV catalog.

Who is affected

Organizations using MongoDB Ruby Driver / BSON for Ruby versions 4.8.0 up to but not including 5.2.1 in applications that parse untrusted Extended JSON and store the result.

What to do

  1. Upgrade BSON for Ruby / MongoDB Ruby Driver to version 5.2.1 or later.
  2. Inventory applications (e.g. review Gemfile.lock) to identify use of affected versions 4.8.0 through before 5.2.1.
  3. Determine whether applications parse Extended JSON from untrusted sources (e.g. user input, API requests) and persist the result.
  4. Until upgraded, restrict or additionally validate untrusted Extended JSON input; follow the vendor advisory for details (https://jira.mongodb.org/browse/RUBY-3936).

Affected products and versions

MongoDB Ruby Driver4.8.0 – < 5.2.1Fixed in: 5.2.1

CVSS vector, explained

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

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
None

Weakness type (CWE)

  • CWE-843 Access of Resource Using Incompatible Type ('Type Confusion')

References

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