CVE-2022-48282: MongoDB.Driver MongoDB .NET/C# Driver Vulnerable To Vulnerability

HIGH
Advisory Identifier: GHSA-7j9m-j397-g4wx
CVSS 7.2
CWE-502
Published
Advisory Summary

CVE-2022-48282 is a HIGH (CVSS 7.2) mongodb .net/c# driver vulnerable to vulnerability (CWE-502: Deserialization of Untrusted Data) affecting MongoDB.Driver libraries in the NuGet ecosystem. The issue involves mongodb .net/c# driver vulnerable to deserialization of untrusted data. Remediation is available by upgrading affected packages to version 2.19.0.

CVE-2022-48282 at a Glance

CVE Identifier CVE-2022-48282
GHSA Identifier GHSA-7j9m-j397-g4wx
Severity HIGH
CVSS v3.1 Base Score 7.2
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product MongoDB.Driver
Package Ecosystem NuGet
Published Date
Last Updated

Security Impact

CVSS: 7.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2022-48282

To remediate this vulnerability, upgrade all affected MongoDB.Driver dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

MongoDB.Driver fixed: 2.19.0
Upgrade MongoDB.Driver to 2.19.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for MongoDB.Driver

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-48282, inspect your project dependencies for MongoDB.Driver:

inspect dependencies for MongoDB.Driver

Analyze the terminal output to locate any version of MongoDB.Driver in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.19.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In MongoDB.Driver, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Under very specific circumstances, 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

CVE-2022-48282 Affected MongoDB.Driver Versions

1 component(s)
Fixed Versions:
2.19.0
Product / Package Ecosystem Affected Versions Fixed Version
MongoDB.Driver
NuGet
< 2.19.0
2.19.0

References

Frequently Asked Questions

What is CVE-2022-48282?
CVE-2022-48282 is a security vulnerability in MongoDB.Driver involving MongoDB .NET/C# Driver vulnerable to Deserialization of Untrusted Data under CWE-502: Deserialization of Untrusted Data.
Which MongoDB.Driver versions are affected?
Affected versions include releases prior to 2.19.0 across affected packages: MongoDB.Driver.
What version fixes CVE-2022-48282?
Upgrading to 2.19.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is MongoDB.Driver affected?
Yes, MongoDB.Driver is affected in releases prior to 2.19.0. Upgrade your dependency to 2.19.0 or later.
What is the CVSS score of CVE-2022-48282?
CVE-2022-48282 has a CVSS v3.1 base score of 7.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-48282?
CVE-2022-48282 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check NuGet dependencies for CVE-2022-48282?
Run the dependency tree command: 'inspect dependencies for MongoDB.Driver'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7j9m-j397-g4wx",
  "modified" : "2023-03-03T22:58:41Z",
  "published" : "2023-02-21T21:30:18Z",
  "aliases" : [ "CVE-2022-48282" ],
  "summary" : "MongoDB .NET/C# Driver vulnerable to Deserialization of Untrusted Data",
  "details" : "Under very specific circumstances, 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",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "MongoDB.Driver"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.19.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-48282"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mongodb/mongo-csharp-driver"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mongodb/mongo-csharp-driver/releases/tag/v2.19.0"
  }, {
    "type" : "WEB",
    "url" : "https://jira.mongodb.org/CSHARP-4475"
  }, {
    "type" : "WEB",
    "url" : "https://jira.mongodb.org/browse/CSHARP-4475"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-03T22:58:41Z",
    "nvd_published_at" : "2023-02-21T19:15:00Z"
  }
}