---
id: CVE-2026-126982
title: >-
  Remote code execution via generic-type allow-list bypass in BSON object
  deserialization
summary: >-
  A type allow-list bypass in the BSON serialization library of the MongoDB C#
  Driver allows a type-restriction check to be circumvented when polymorphic
  data is deserialized into loosely typed members. An unauthorized party who can
  supply…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'
cvssSource: cna
cwe:
  - CWE-502
vendor: MongoDB
product: C# Driver
affected:
  - c_driver >= 3.2.0 < 3.14.0
published: '2026-11-13'
updated: '2026-11-13'
sourceUpdated: '2026-11-13T00:00:12.446Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-126982'
references:
  - url: 'https://jira.mongodb.org/browse/CSHARP-6160'
tags:
  - cve.org
ingestedAt: '2026-11-13T00:18:16.515Z'
---

## Overview

A type allow-list bypass in the BSON serialization library of the MongoDB C# Driver allows a type-restriction check to be circumvented when polymorphic data is deserialized into loosely typed members. An unauthorized party who can supply or plant BSON/JSON data that the application later deserializes can cause the application process to instantiate .NET types outside the intended allow-list and populate them with unauthorized party-controlled values. In applications that contain a suitable gadget type, this can lead to arbitrary code execution in the context of the application, with corresponding loss of confidentiality, integrity, and availability. No special privileges beyond the ability to introduce data the application reads are required.

## Affected

- `c_driver >= 3.2.0 < 3.14.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
