# GHSA-5mrr-rgp6-x4gr: Command Injection in marsdb

- Severity: Critical (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2020-09-03T19:39:05.000Z
- Modified: 2020-08-31T18:48:01.000Z
- Weaknesses: CWE-77

## Description

All versions of `marsdb` are vulnerable to Command Injection. In the `DocumentMatcher` class, selectors on `$where` clauses are passed to a Function constructor unsanitized. This allows attackers to run arbitrary commands in the system when the function is executed.


## Recommendation

No fix is currently available. Consider using an alternative package until a fix is made available.

(As written by GitHub Advisory Database.)

## Affected

- marsdb (npm): from 0.0.0

## References

- <https://github.com/bkimminich/juice-shop/issues/1173> (web)
- <https://www.npmjs.com/advisories/1122> (web)

## Sources

- GitHub Advisory Database: [GHSA-5mrr-rgp6-x4gr](https://github.com/advisories/GHSA-5mrr-rgp6-x4gr), CC-BY-4.0, modified 2020-08-31

---

Page: https://cve.day/GHSA-5mrr-rgp6-x4gr · Whole record: https://cve.day/GHSA-5mrr-rgp6-x4gr.json · Rebuilt by cve.day 2026-11-25T22:56:44.218Z
