CVE-2021-20332: Mongodb Exposure Of Sensitive Information To Vulnerability
MODERATECVE-2021-20332 is a MODERATE (CVSS 4.4) exposure of sensitive information to vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Mongodb libraries in the crates.io ecosystem. The issue involves exposure of sensitive information to an unauthorized actor in mongodb rust driver. Remediation is available by upgrading affected packages to version 2.0.0-beta.
CVE-2021-20332 at a Glance
Security Impact
CVSS: 4.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2021-20332
To remediate this vulnerability, upgrade all affected Mongodb dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade mongodb to 2.0.0-beta
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for mongodb
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-20332, inspect your project dependencies for Mongodb:
inspect dependencies for mongodb
Analyze the terminal output to locate any version of Mongodb in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.0-beta), 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-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Mongodb, 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
CVE-2021-20332 Affected Mongodb Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mongodb
|
crates.io |
≥ 1.0.0
< 2.0.0-beta
|
2.0.0-beta
|
References
Frequently Asked Questions
What is CVE-2021-20332?
Which Mongodb versions are affected?
What version fixes CVE-2021-20332?
Is mongodb affected?
What is the CVSS score of CVE-2021-20332?
What CWE is associated with CVE-2021-20332?
How can I check crates.io dependencies for CVE-2021-20332?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4rjr-3gj2-5crq",
"modified" : "2022-06-17T21:39:29Z",
"published" : "2022-05-24T19:09:36Z",
"aliases" : [ "CVE-2021-20332" ],
"summary" : "Exposure of Sensitive Information to an Unauthorized Actor in MongoDB Rust Driver",
"details" : "Specific MongoDB Rust Driver versions can include credentials used by the connection pool to authenticate connections in the monitoring event that is emitted when the pool is created. The user's logging infrastructure could then potentially ingest these events and unexpectedly leak the credentials. Note that such monitoring is not enabled by default.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "mongodb"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "2.0.0-beta"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.0.0-alpha1"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-20332"
}, {
"type" : "WEB",
"url" : "https://github.com/mongodb/mongo-rust-driver/commit/9e8782b1bb1104e5399c073b553719c262d4463c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mongodb/mongo-rust-driver"
}, {
"type" : "WEB",
"url" : "https://jira.mongodb.org/browse/RUST-591"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T21:39:29Z",
"nvd_published_at" : "2021-08-02T13:15:00Z"
}
}