CVE-2019-10758
KEV PoC moderateAuthenticated Remote Code Execution in mongo-express web admin UI
CISA: MongoDB mongo-express Remote Code Execution Vulnerability
mongo-express, the web-based administration interface for MongoDB, is vulnerable to remote code execution (CWE-94 code injection) in versions before 0.54.0. The flaw stems from a misuse of the Node.js `vm` dependency: endpoints that invoke the `toBSON` method evaluate attacker-supplied input via `exec`-style commands outside a properly sandboxed environment, so an authenticated web-UI user (CVSS PR:L) can trigger the flaw over the network with no user interaction. Successful exploitation yields arbitrary command execution on the host running mongo-express, typically with access to the MongoDB instance and potentially the surrounding container or server. Any mongo-express deployment prior to 0.54.0 is affected, particularly instances exposed to the internet or shared networks where default or weak credentials are in use. Exploitation is confirmed in the wild: CISA added the flaw to the Known Exploited Vulnerabilities Catalog on 2021-12-10, EPSS assigns an ~84.7% probability of exploitation within 30 days, and public proof-of-concept references are available.
What to do: Upgrade mongo-express to version 0.54.0 or later, per CISA's required action to apply vendor updates. Restrict the mongo-express web UI to trusted networks and set strong, non-default credentials, since triggering the flaw requires an authenticated session. Inventory Node.js and Docker-based deployments running mongo-express, especially internet-facing ones, and patch them promptly as this flaw is on CISA's Known Exploited Vulnerabilities list.
| mongo-express project mongo-express | all versions before 0.54.0 (fixed in 0.54.0) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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.
- Affected
- MongoDB mongo-express
- Required action
- Apply updates per vendor instructions.
- Due date
- Ransomware use
- Unknown
- Vendors
- mongo-express project
- Products
- mongo-express
- Weakness
- CWE-94
- Vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H