npmjs.com
https://www.npmjs.com/advisories/1448 GHSA-97MG-3CR6-3X4C
Remote Code Execution in mongodb-query-parser
Description
Versions of `mongodb-query-parser` prior to 2.0.0 are vulnerable to Remote Code Execution. The package fails to sanitize queries, allowing attackers to execute arbitrary code in the system. Parsing the following payload executes `touch test-file`: ```'(function () { return (clearImmediate.constructor("return process;")()).mainModule.require("child_process").execSync("touch test-file").toString()})()'``` ## Recommendation Upgrade to version 2.0.0 or later.
Description source: GitHub Advisory
Affected products and versions
1| Product | Source | Version range | Status |
|---|---|---|---|
mongodb-query-parserBrowse npm / mongodb-query-parser | GitHub Advisory | Before 2.0.0 · Fixed in 2.0.0 | affected |