Remote Code Execution Vulnerability in NPM mongo-express
CISA confirms exploitation of this vulnerability in real attacks. Prioritise checking whether your application is affected. CISA KEV · CC0 1.0
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 software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | mongo-express | < 0.54.0 | 0.54.0 |
References
- https://github.com/mongo-express/mongo-express/security/advisories/GHSA-h47j-hc6x-h3qq
- https://nvd.nist.gov/vuln/detail/CVE-2019-10758
- https://github.com/mongo-express/mongo-express/pull/522
- https://github.com/mongo-express/mongo-express/commit/7d365141deadbd38fa961cd835ce68eab5731494
- https://github.com/mongo-express/mongo-express/commit/d8c9bda46a204ecba1d35558452685cd0674e6f2
- https://github.com/mongo-express/mongo-express
- https://github.com/mongo-express/mongo-express/blob/ea02b364d43f179f191fc91fb9962efdb0843a8d/lib/bson.js#L60
- https://snyk.io/vuln/SNYK-JS-MONGOEXPRESS-473215
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2019-10758
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H/E:H- Weakness (CWE)
CWE-78, CWE-94- Platform
- npm
- Package
mongo-express- Disclosed
- 30.12.2019
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-h47j-hc6x-h3qq - CC BY 4.0
Vulnerability history: mongo-express
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 4
- First → latest
- 12.2019 03.2024
- Without a fix
- 2
- Exploited in attacks
- 1
Severity breakdown
- Critical 1
- High 1
- Medium 2
Disclosures per year
- 2019: 1
- 2020: 0
- 2021: 2
- 2022: 0
- 2023: 0
- 2024: 1
- 2025: 0
- 2026: 0
-
Remote Code Execution Vulnerability in NPM mongo-express this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.