CVE-2019-10758
Remote Code Execution Vulnerability in NPM mongo-express
mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the toBSON method. A misuse of the vm dependency to perform exec commands in a non-safe environment.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.9
mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the toBSON method. A misuse of the vm dependency to perform exec commands in a non-safe environment.
- Record
CVE-2019-10758- CVSS 3.1
- 9.9 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H - CVSS 2.0
- 9.0 High
AV:N/AC:L/Au:S/C:C/I:C/A:C - Weakness
- CWE-94
- Updated
- 2026-11-02
CVE List
9.9
mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the toBSON method. A misuse of the vm dependency to perform exec commands in a non-safe environment.
- Record
CVE-2019-10758- CVSS 3.1
- 9.9 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-94
- Updated
- 2026-11-02
EUVDEUVD-2019-0791
9.9
mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the toBSON method. A misuse of the vm dependency to perform exec commands in a non-safe environment.
- Record
EUVD-2019-0791- CVSS 3.1
- 9.9 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-h47j-hc6x-h3qq
9.9
Remote Code Execution Vulnerability in NPM mongo-express
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.
- Record
GHSA-h47j-hc6x-h3qq- CVSS 3.1
- 9.9 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H/E:H - Weakness
- CWE-78, CWE-94
- Updated
- 2026-11-02
CISA KEV No score
MongoDB mongo-express Remote Code Execution Vulnerability
mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the toBSON method.
- Record
CVE-2019-10758- Updated
- 2026-11-02
OSV
9.9
mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the toBSON method. A misuse of the vm dependency to perform exec commands in a non-safe environment.
- Record
CVE-2019-10758- CVSS 3.1
- 9.9 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
OSVGHSA-h47j-hc6x-h3qq
9.9
Remote Code Execution Vulnerability in NPM mongo-express
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.
- Record
GHSA-h47j-hc6x-h3qq- CVSS 3.1
- 9.9 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H/E:H - Weakness
- CWE-78, CWE-94
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
mongo-expressnpm |
before 0.54.0 | 0.54.0 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | masahiro331/CVE-2019-10758 | 2019-12-26 |
| PoC in GitHub | lp008/CVE-2019-10758 | 2020-01-05 |
| PoC in GitHub | CyberCTF/vulhub-mongo-express-cve-2019-10758 | 2026-10-08 |
| Nuclei | mongo-express Remote Code Execution |
History
| Recorded | Changed | Sources |
|---|---|---|
| exploitation, exploits | ||
| first indexed | CVE List, EUVD, GitHub Advisories, CISA KEV, Nuclei, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2019-10758 is a critical vulnerability (CVSS 9.9) in Mongo-express Project Mongo-express, published December 24, 2019. CISA lists it as known to be exploited, since December 10, 2021. EUVD reports exploitation since December 10, 2021. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 84.7%, the 99th percentile. Fixed in mongo-express 0.54.0.
References
snyk.io/vuln/SNYK-JS-MONGOEXPRESS-473215
cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2019-10758
github.com/mongo-express/mongo-express/security/advisories/GHSA-h47j-hc6x-h3qq
github.com/mongo-express/mongo-express/pull/522
github.com/mongo-express/mongo-express/commit/7d365141deadbd38fa961cd835ce68eab5731494
nvd.nist.gov/vuln/detail/CVE-2019-10758