GHSA-97mg-3cr6-3x4c json
Remote Code Execution in mongodb-query-parser
published 6y ago modified 6y ago
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm mongodb-query-parser 2.0.0
Is GHSA-97mg-3cr6-3x4c in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | mongodb-query-parser | <2.0.0 |
2.0.0 |
References
Sources
- GitHub Advisory GHSA-97mg-3cr6-3x4c
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.