{"id":"GHSA-97mg-3cr6-3x4c","aliases":[],"status":"published","title":"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`: \n\n```'(function () { return (clearImmediate.constructor(\"return process;\")()).mainModule.require(\"child_process\").execSync(\"touch test-file\").toString()})()'```\n\n\n\n## Recommendation\n\nUpgrade to version 2.0.0 or later.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2020-09-04T17:27:23Z","modified":"2023-01-09T05:04:12Z","fixes":[{"ecosystem":"npm","package":"mongodb-query-parser","fixed_in":["2.0.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"mongodb-query-parser","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}]},{"source":"osv","ecosystem":"npm","package":"mongodb-query-parser","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}]}],"references":[{"url":"https://www.npmjs.com/advisories/1448","tags":["web"]},{"url":"https://github.com/advisories/GHSA-97mg-3cr6-3x4c"}],"sources":{"ghsa":[{"id":"GHSA-97mg-3cr6-3x4c","title":"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`: \n\n```'(function () { return (clearImmediate.constructor(\"return process;\")()).mainModule.require(\"child_process\").execSync(\"touch test-file\").toString()})()'```\n\n\n\n## Recommendation\n\nUpgrade to version 2.0.0 or later.","status":"published","published":"2020-09-04T17:27:23Z","modified":"2023-01-09T05:04:12Z","updated_at":"2026-11-02T14:36:08.863482Z"}],"osv":[{"id":"GHSA-97mg-3cr6-3x4c","title":"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`: \n\n```'(function () { return (clearImmediate.constructor(\"return process;\")()).mainModule.require(\"child_process\").execSync(\"touch test-file\").toString()})()'```\n\n\n\n## Recommendation\n\nUpgrade to version 2.0.0 or later.","status":"published","published":"2020-09-04T17:27:23Z","modified":"2020-08-31T18:59:39Z","updated_at":"2026-11-02T15:46:43.524801Z"}]}}
