Vulnerability record · CVE-2020-24391 · published 30 March 2021
CVE-2020-24391: mongo-express unsafe advanced syntax handling enables code execution
MMongo Express Project · Mongo Express
mongo-express before 1.0.0 supports certain advanced syntax but implements it unsafely, allowing crafted input to be evaluated rather than treated as data. The flaw is rated critical (CVSS 9.8) and may overlap CVE-2019-10769, so the exact vulnerable code path is not fully described in this record.
Description
mongo-express before 1.0.0 offers support for certain advanced syntax but implements this in an unsafe way. NOTE: this may overlap CVE-2019-10769.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Automated analysis
critical priorityCVSS 9.8 with network reachability, no authentication and no user interaction, combined with a very high EPSS probability, makes this an urgent patch target.
What it is
mongo-express before 1.0.0 supports certain advanced syntax but implements it unsafely, allowing crafted input to be evaluated rather than treated as data. The flaw is rated critical (CVSS 9.8) and may overlap CVE-2019-10769, so the exact vulnerable code path is not fully described in this record.
Impact
An unauthenticated remote attacker can achieve full compromise of confidentiality, integrity and availability of the mongo-express instance and the MongoDB data it manages. This can lead to arbitrary code execution or full database takeover.
Attack surface
Reachable over the network via the mongo-express web interface with no authentication and no user interaction required, per the CVSS vector AV:N/AC:L/PR:N/UI:N. The specific endpoint or parameter is not identified in the record.
Exploitation
Not listed in CISA KEV and no public exploit reference is tagged, but EPSS is very high at 0.745 (99.5th percentile), indicating strong likelihood of exploitation activity. The patch commit is public, which lowers the effort to develop an exploit.
What to do
- Upgrade mongo-express to 1.0.0 or later, applying the referenced patch commit.
- If upgrade is not possible, restrict network access to the mongo-express interface to trusted management networks only.
- Enable authentication on mongo-express and place it behind a reverse proxy with strong access controls.
- Run mongo-express with least-privilege MongoDB credentials and isolate it from production database clusters.
- Monitor for the overlapping CVE-2019-10769 and apply any related fixes to the query-parser dependency.
Detection
- Inspect mongo-express and MongoDB logs for requests containing advanced query syntax or unexpected JavaScript-like operators.
- Alert on outbound network connections or process spawns from the mongo-express host that are not part of normal operation.
- Monitor for unusual MongoDB commands or document operations originating from the mongo-express service account.
- Track version banners or package inventories to identify mongo-express instances below 1.0.0.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
| Link | Tags |
|---|---|
| https://github.com/mongo-express/mongo-express/commit/3a26b079e7821e0e209c3ee0cc2ae15ad467b91a | PatchThird Party Advisory |
| https://github.com/mongodb-js/query-parser/issues/16 | Third Party Advisory |
| https://github.com/mongo-express/mongo-express/commit/3a26b079e7821e0e209c3ee0cc2ae15ad467b91a | PatchThird Party Advisory |
| https://github.com/mongodb-js/query-parser/issues/16 | Third Party Advisory |
Track CVE-2020-24391 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2020-24391), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.