CVE-2022-48282

Deserializing compromised object with MongoDB .NET/C# Driver may cause remote code execution

State
Published
Severity
6.6 Medium
Published
Feb 21, 2023
Updated
Mar 11, 2025
Reserved
Jan 23, 2023

Read the record on cve.org

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

Scores

CVSSScoreVectorSource
3.16.6 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:Hmongodb

Weaknesses

  • CWE-502 Deserialization of Untrusted Data

Affected Products

ProductVersions
MongoDB .NET/C# DriverMongoDB Inc
  • v2.18.0 and earlierAffected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.