# CVE-2019-10758: mongo-express remote code execution in index creation

Source: https://junglewise.ai/threats/cve-2019-10758-mongodb-mongo-express-remote-code-execution-vulnerability  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2019-12-30. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2019-10758 · Severity: critical · CVSS 3.1 · Exploited in the wild · Published 2019-12-30

mongo-express is a Node.js web-based MongoDB administration interface. An authenticated attacker can execute arbitrary code on the host machine by injecting malicious JavaScript into the index creation field, potentially leading to full system compromise.

Technologies: [MongoDB Mongo-Express](https://junglewise.ai/threats/technologies/mongo-express), [mongo-express (npm)](https://junglewise.ai/threats/technologies/npm-mongo-express). Vendors: [MongoDB](https://junglewise.ai/threats/vendors/mongodb), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2019-10758 exploited in the wild?** Yes. CVE-2019-10758 is known to be exploited in the wild, first recorded on 10 December 2021. Treat it as urgent.

**How severe is CVE-2019-10758?** Critical severity, with a CVSS score of 3.1, published 30 December 2019.

**Which products and versions are affected?** mongo-express (npm) SEMVER:introduced=0,fixed=0.54.0.

**Is there a fix for CVE-2019-10758?** Yes. mongo-express (npm): upgrade to 0.54.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2019-10758 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2019-10758?** Check whether you run MongoDB Mongo-Express or mongo-express (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- mongo-express (npm): upgrade to 0.54.0 or later

  ```sh
  npm install mongo-express@0.54.0
  ```


## Technical details

The vulnerability is a code injection flaw (CWE-94) in the index creation functionality of mongo-express. The vulnerable component uses unsafe JavaScript evaluation (eval-like behavior) to process user-supplied input in the "create index" field without proper sanitization. An authenticated user can inject arbitrary JavaScript code that executes in the context of the Node.js process, allowing them to invoke system commands via child_process module. The attack requires authentication to the mongo-express interface but no additional user interaction. The patch was released in version 0.54.0, which implements proper input validation and removes unsafe evaluation patterns.

## Affected products

- mongo-express mongo-express all versions prior to 0.54.0

## Identifiers

- CVE-2019-10758
- GHSA-h47j-hc6x-h3qq

## Timeline

- 2019-12-30: disclosed
- 2019-12-30: patched: Version 0.54.0 released
- 2019-12-24: exploited: Exploited in the wild per CISA KEV
- kev added: Listed in CISA Known Exploited Vulnerabilities catalog

## References

- [https://github.com/mongo-express/mongo-express/security/advisories/GHSA-h47j-hc6x-h3qq](https://github.com/mongo-express/mongo-express/security/advisories/GHSA-h47j-hc6x-h3qq)

## Related threats

- [mongo-express Cross-Site Request Forgery in admin interface](https://junglewise.ai/threats/cve-2023-52555-mongo-express-cross-site-request-forgery-in-admin-interface)
- [mongo-express denial of service in CSV export](https://junglewise.ai/threats/cve-2021-23372-mongo-express-denial-of-service-in-csv-export)
- [mongo-express multiple cross-site scripting vulnerabilities](https://junglewise.ai/threats/cve-2021-21422-mongo-express-multiple-cross-site-scripting-vulnerabilities)
