CVE-2019-10758 is a critical-severity (CVSS 9.9) Code Injection vulnerability in mongo-express. It is in CISA's Known Exploited Vulnerabilities catalog (added 2021-12-10) — treat it as actively exploited and patch now. A fix is available for mongo-express — see the affected versions and patch details below.
Remote Code Execution Vulnerability in NPM mongo-express
Exploitation Status
Actively exploited in the wild
- Confirmed by CISA's Known Exploited Vulnerabilities catalog on 2021-12-10. Federal agencies were required to remediate by 2022-06-10.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA (KEV catalog and SSVC triage) for CVE-2019-10758.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2019-10758 by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).
Where this sits among everything scored
Of 395,249 CVEs with a current EPSS score, this one falls in the 50–90% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
mongo-expressnpmDescription
Impact
Remote code execution on the host machine by any authenticated user.
Proof Of Concept
Launching mongo-express on a Mac, pasting the following into the "create index" field will pop open the Mac calculator:
this.constructor.constructor("return process")().mainModule.require('child_process').execSync('/Applications/Calculator.app/Contents/MacOS/Calculator')
Patches
Users should upgrade to version 0.54.0
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
For more information
If you have any questions or comments about this advisory:
- Open an issue in example link to repo
- Email us at example email address
Thanks
@JLLeitschuh for finding and reporting this vulnerability
This vulnerability has been exploited in the wild.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | mongo-express | all versions | 0.54.0npm install mongo-express@0.54.0 |
Affected Products
mongo-expressmongo-express_projectResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
mongo-express before 0.54.0 is vulnerable to Remote Code Execution via e…
mongo-express before 0.54.0 is vulnerable to Remote Code Execution via e…
mongo-express before 0.54.0 is vulnerable to Remote Code Execution via e…
mongo-express before 0.54.0 is vulnerable to Remote Code Execution via e…
mongo-express before 0.54.0 is vulnerable to Remote Code Execution via e…
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for mongo-express, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update mongo-express to 0.54.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2019-10758 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
How to detect CVE-2019-10758
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2019-10758 -u https://target- Template
- mongo-express Remote Code Execution
- Severity
- critical
- Impact
- Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected system.
- Remediation
- Upgrade mongo-express to version 0.54.0 or higher.
Template by ProjectDiscovery nuclei-templates (princechaddha), MIT licensed. View the full template. Scan only systems you are authorised to test.
Frequently Asked Questions
Is CVE-2019-10758 in your dependencies?
Find it across npm, including transitive dependencies.