CVE-2019-10758: Remote Code Execution Vulnerability in NPM mongo-express
10
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.99954%
CWE
Published
12/30/2019
Updated
2/7/2025
KEV Status
Yes
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
mongo-express | npm | < 0.54.0 | 0.54.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from unsafe usage of Node.js' vm
module in the BSON parsing logic. The proof-of-concept demonstrates attacker-controlled input reaching the vm
context, enabling access to process.mainModule.require()
. The commit diff shows replacement of vm
-based parsing with mongodb-query-parser
in lib/bson.js
, and Snyk's advisory explicitly mentions 'endpoints that use the toBSON
method' as the attack vector. The combination of direct code execution evidence and patching strategy confirms toBSON
's role.