{"id":"CVE-2019-10758","aliases":["EUVD-2019-0791","GHSA-h47j-hc6x-h3qq","SNYK-JS-MONGOEXPRESS-473215"],"status":"published","title":"Remote Code Execution Vulnerability in NPM mongo-express","description":"mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the `toBSON` method. A misuse of the `vm` dependency to perform `exec` commands in a non-safe environment.","severity":{"version":"3.1","score":9.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.84726,"percentile":0.99709,"model":"v2026.06.15"},"facts":{"in_kev":true,"known_exploited":true,"public_exploit":true,"fix_available":true},"cwes":["CWE-78","CWE-94"],"published":"2019-12-24T21:08:36Z","modified":"2026-10-24T10:30:16Z","kev":{"date_added":"2021-12-10","due_date":"2022-06-10","required_action":"Apply updates per vendor instructions.","known_ransomware_use":"Unknown"},"exploitation":[{"source":"euvd","since":"2021-12-10"},{"source":"kev","since":"2021-12-10"}],"exploits":[{"source":"pocgithub","id":"masahiro331/CVE-2019-10758","title":"masahiro331/CVE-2019-10758","date":"2019-12-26","url":"https://github.com/masahiro331/CVE-2019-10758"},{"source":"pocgithub","id":"lp008/CVE-2019-10758","title":"lp008/CVE-2019-10758","date":"2020-01-05","url":"https://github.com/lp008/CVE-2019-10758"},{"source":"pocgithub","id":"CyberCTF/vulhub-mongo-express-cve-2019-10758","title":"CyberCTF/vulhub-mongo-express-cve-2019-10758","date":"2026-10-08","url":"https://github.com/CyberCTF/vulhub-mongo-express-cve-2019-10758"},{"source":"nuclei","id":"CVE-2019-10758","title":"mongo-express Remote Code Execution","type":"detection template","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2019/CVE-2019-10758.yaml"}],"fixes":[{"ecosystem":"npm","package":"mongo-express","fixed_in":["0.54.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"mongo-express","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.54.0"}]}]},{"source":"osv","ecosystem":"npm","package":"mongo-express","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.54.0"}]}]}],"products":[{"vendor":"mongo-express_project","product":"mongo-express"},{"vendor":"mongodb","product":"mongo-express"}],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-MONGOEXPRESS-473215","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","evidence","web"]},{"url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2019-10758","tags":["government-resource","US Government Resource","web"]},{"url":"https://github.com/mongo-express/mongo-express/security/advisories/GHSA-h47j-hc6x-h3qq","tags":["web"]},{"url":"https://github.com/mongo-express/mongo-express/pull/522","tags":["web"]},{"url":"https://github.com/mongo-express/mongo-express/commit/7d365141deadbd38fa961cd835ce68eab5731494","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2019-10758","tags":["advisory"]},{"url":"https://github.com/mongo-express/mongo-express/commit/d8c9bda46a204ecba1d35558452685cd0674e6f2","tags":["web"]},{"url":"https://github.com/mongo-express/mongo-express/blob/ea02b364d43f179f191fc91fb9962efdb0843a8d/lib/bson.js#L60","tags":["web"]},{"url":"https://github.com/advisories/GHSA-h47j-hc6x-h3qq"},{"url":"https://github.com/mongo-express/mongo-express","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2019-10758","description":"mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the `toBSON` method. A misuse of the `vm` dependency to perform `exec` commands in a non-safe environment.","status":"published","published":"2019-12-24T21:08:36Z","modified":"2025-10-21T23:35:54.793Z","cvss":[{"version":"3.1","score":9.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"adp"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:20:19.399352Z"}],"euvd":[{"id":"EUVD-2019-0791","description":"mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the `toBSON` method. A misuse of the `vm` dependency to perform `exec` commands in a non-safe environment.","status":"published","published":"2019-12-24T21:08:36Z","modified":"2025-10-21T23:35:54Z","cvss":[{"version":"3.1","score":9.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"critical"}],"exploited_since":"2021-12-10","updated_at":"2026-11-02T20:31:24.816637Z"}],"ghsa":[{"id":"GHSA-h47j-hc6x-h3qq","title":"Remote Code Execution Vulnerability in NPM mongo-express","description":"### Impact\n\nRemote code execution on the host machine by any authenticated user.\n\n### Proof Of Concept\n\nLaunching mongo-express on a Mac, pasting the following into the \"create index\" field will pop open the Mac calculator:\n\n```javascript\nthis.constructor.constructor(\"return process\")().mainModule.require('child_process').execSync('/Applications/Calculator.app/Contents/MacOS/Calculator')\n```\n\n### Patches\nUsers should upgrade to version `0.54.0`\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [example link to repo](http://example.com)\n* Email us at [example email address](mailto:example@example.com)\n\n#### Thanks\n\n@JLLeitschuh for finding and reporting this vulnerability\n\nThis vulnerability has been [exploited](https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2019-10758) in the wild.","status":"published","published":"2019-12-30T19:30:31Z","modified":"2025-10-22T17:45:00Z","cvss":[{"version":"3.1","score":9.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H/E:H","level":"critical"}],"cwes":["CWE-78","CWE-94"],"updated_at":"2026-11-02T14:39:02.474737Z"}],"kev":[{"id":"CVE-2019-10758","title":"MongoDB mongo-express Remote Code Execution Vulnerability","description":"mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the `toBSON` method.","kev":{"date_added":"2021-12-10","due_date":"2022-06-10","required_action":"Apply updates per vendor instructions.","known_ransomware_use":"Unknown"},"updated_at":"2026-11-02T17:00:16.541131Z"}],"nvd":[{"id":"CVE-2019-10758","description":"mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the `toBSON` method. A misuse of the `vm` dependency to perform `exec` commands in a non-safe environment.","status":"published","published":"2019-12-24T22:15:11.183Z","modified":"2026-06-17T02:11:36.92Z","cvss":[{"version":"3.1","score":9.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"3.1","score":9.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"secondary"},{"version":"2.0","score":9,"vector":"AV:N/AC:L/Au:S/C:C/I:C/A:C","level":"high","assessor":"primary"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:05:40.856496Z"}],"osv":[{"id":"CVE-2019-10758","description":"mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the `toBSON` method. A misuse of the `vm` dependency to perform `exec` commands in a non-safe environment.","status":"published","published":"2019-12-24T22:15:11.183Z","modified":"2026-10-24T10:30:16.676719303Z","cvss":[{"version":"3.1","score":9.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:10.383287Z"},{"id":"GHSA-h47j-hc6x-h3qq","title":"Remote Code Execution Vulnerability in NPM mongo-express","description":"### Impact\n\nRemote code execution on the host machine by any authenticated user.\n\n### Proof Of Concept\n\nLaunching mongo-express on a Mac, pasting the following into the \"create index\" field will pop open the Mac calculator:\n\n```javascript\nthis.constructor.constructor(\"return process\")().mainModule.require('child_process').execSync('/Applications/Calculator.app/Contents/MacOS/Calculator')\n```\n\n### Patches\nUsers should upgrade to version `0.54.0`\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [example link to repo](http://example.com)\n* Email us at [example email address](mailto:example@example.com)\n\n#### Thanks\n\n@JLLeitschuh for finding and reporting this vulnerability\n\nThis vulnerability has been [exploited](https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2019-10758) in the wild.","status":"published","published":"2019-12-30T19:30:31Z","modified":"2026-09-10T03:49:24.74781436Z","cvss":[{"version":"3.1","score":9.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H/E:H","level":"critical"}],"cwes":["CWE-78","CWE-94"],"updated_at":"2026-11-02T15:46:48.546324Z"}]}}
