CVE-2021-23372: Mongo express Denial of Service Vulnerability
MODERATECVE-2021-23372 is a MODERATE (CVSS 4.4) denial of service vulnerability (CWE-754: Improper Check for Unusual or Exceptional Conditions) affecting Mongo express libraries in the npm ecosystem. The issue involves denial of service (dos) in mongo-express. Remediation is available in the latest vendor maintenance releases.
CVE-2021-23372 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:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2021-23372
To remediate this vulnerability, upgrade all affected Mongo express dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install mongo-express@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls mongo-express
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-23372, inspect your project dependencies using npm:
npm ls mongo-express
Analyze the terminal output to locate any version of Mongo express in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls mongo-express command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-754: Improper Check for Unusual or Exceptional Conditions, where the product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product. In Mongo express, 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-23372 Affected Mongo express Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mongo-express
|
npm |
≤ 0.54.0
|
|
References
Frequently Asked Questions
What is CVE-2021-23372?
Which Mongo express versions are affected?
What version fixes CVE-2021-23372?
Is mongo-express affected?
What is the CVSS score of CVE-2021-23372?
What CWE is associated with CVE-2021-23372?
How can I check npm dependencies for CVE-2021-23372?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m2r3-8492-vx59",
"modified" : "2021-10-06T15:13:57Z",
"published" : "2021-10-06T17:47:46Z",
"aliases" : [ "CVE-2021-23372" ],
"summary" : "Denial of Service (DoS) in mongo-express",
"details" : "All versions of package mongo-express are vulnerable to Denial of Service (DoS) when exporting an empty collection as CSV, due to an unhandled exception, leading to a crash.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "mongo-express"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.54.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-23372"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mongo-express/mongo-express"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JS-MONGOEXPRESS-1085403"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-754" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-10-06T15:13:57Z",
"nvd_published_at" : "2021-04-13T20:15:00Z"
}
}