{"answers":{"affected":"2 open source packages ship an affected version, including mongo-express. It affects 1 product.","exploited":"Yes. Attackers have exploited CVE-2019-10758 in the wild since at least 10 Dec 2021.","fix":"Upgrade mongo-express to 0.54.0 or later. US federal agencies must fix it by 10 Jun 2022.","what":"CVE-2019-10758 is a critical code injection vulnerability in mongo-express, published on 24 Dec 2019. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2019-10758 and fix it if it is affected.\n\nWhat it is: CVE-2019-10758 is a critical code injection vulnerability in mongo-express, published on 24 Dec 2019. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: Yes. Attackers have exploited CVE-2019-10758 in the wild since at least 10 Dec 2021.\n\nAffected packages and fixed versions:\n- mongo-express (npm): affected all versions; fixed in 0.54.0\n- mongo-express (npm): affected all versions; fixed in 0.54.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2019-10758/ (Markdown: https://insights.sbomify.com/CVE-2019-10758/index.md)","id":"CVE-2019-10758","markdown":"https://insights.sbomify.com/CVE-2019-10758/index.md","name":"CVE-2019-10758","record":{"aliases":["GHSA-h47j-hc6x-h3qq","SNYK-JS-MONGOEXPRESS-473215"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"MongoDB web admin","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary code via the toBSON method in mongo-express due to unsafe vm usage, requiring an upgrade to secure the application.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"snyk","cpe":[{"product":"mongo-express","vendor":"mongo-express_project"}],"cvss":{"score":9.9,"severity":"critical","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":"2019-12-26","github_poc":3,"max_poc_stars":112,"metasploit":0,"nuclei":1,"refs":[{"date":"2019-12-26T06:58:56Z","kind":"github_poc","ref":"https://github.com/masahiro331/CVE-2019-10758","stars":112,"title":null},{"date":"2020-01-05T14:05:56Z","kind":"github_poc","ref":"https://github.com/lp008/CVE-2019-10758","stars":5,"title":"CVE-2019-10758"},{"date":"2026-10-08T20:15:25Z","kind":"github_poc","ref":"https://github.com/CyberCTF/vulhub-mongo-express-cve-2019-10758","stars":0,"title":"Vulhub mongo-express/CVE-2019-10758: mongo-express Remote Code Execution (CVE-2019-10758), run with Isoloom"},{"date":null,"kind":"nuclei","ref":"http/cves/2019/CVE-2019-10758.yaml","stars":null,"title":"mongo-express Remote Code Execution"}],"tier":"exploited"},"has_fix":true,"headline":"MongoDB mongo-express Remote Code Execution","id":"CVE-2019-10758","indexable":true,"kev":{"dateAdded":"2021-12-10","dueDate":"2022-06-10","knownRansomwareCampaignUse":"Unknown","product":"mongo-express","requiredAction":"Apply updates per vendor instructions.","vendorProject":"MongoDB","vulnerabilityName":"MongoDB mongo-express Remote Code Execution Vulnerability"},"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"code_injection","year":"2019"},"n_packages":2,"n_references":1,"next":{"headline":"Sandbox Breakout / Arbitrary Code Execution in safer-eval","id":"CVE-2019-10759"},"packages":[{"ecosystem":"npm","fixed":["0.54.0"],"introduced":["0"],"last_affected":[],"package":"mongo-express","purl":null,"source":"GHSA-h47j-hc6x-h3qq"},{"ecosystem":"npm","fixed":["0.54.0"],"introduced":["0"],"last_affected":[],"package":"mongo-express","purl":"pkg:npm/mongo-express","source":"GHSA-h47j-hc6x-h3qq"}],"prev":{"headline":"SQL Injection in knex","id":"CVE-2019-10757"},"products":["mongo-express"],"published":"2019-12-24","related":[{"cvss_score":9.8,"headline":"Remote code execution in mongo-express","id":"CVE-2020-24391","kev_date_added":null,"published":"2021-03-30"},{"cvss_score":8.1,"headline":"XSS Vulnerability in mongo-express","id":"CVE-2021-21422","kev_date_added":null,"published":"2021-06-21"},{"cvss_score":6.1,"headline":"mongo-express Cross-site Request Forgery vulnerability","id":"CVE-2023-52555","kev_date_added":null,"published":"2024-03-01"},{"cvss_score":4.4,"headline":"Denial of Service (DoS)","id":"CVE-2021-23372","kev_date_added":null,"published":"2021-04-13"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"open","licence":"CC0 1.0","name":"CISA KEV"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"active","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-10-21","vendors":["n/a"]},"summary":"Attackers can execute arbitrary code via the toBSON method in mongo-express due to unsafe vm usage, requiring an upgrade to secure the application.","url":"https://insights.sbomify.com/CVE-2019-10758/"}