{"id":"GHSA-97mg-3cr6-3x4c","summary":"Remote Code Execution in mongodb-query-parser","details":"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.","modified":"2020-08-31T18:59:39Z","published":"2020-09-04T17:27:23Z","database_specific":{"cwe_ids":[],"severity":"CRITICAL","github_reviewed":true,"github_reviewed_at":"2020-08-31T18:59:39Z","nvd_published_at":null},"references":[{"type":"WEB","url":"https://www.npmjs.com/advisories/1448"}],"affected":[{"package":{"name":"mongodb-query-parser","ecosystem":"npm","purl":"pkg:npm/mongodb-query-parser"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-97mg-3cr6-3x4c/GHSA-97mg-3cr6-3x4c.json"}}],"schema_version":"1.9.0"}