{"answers":{"affected":"2 open source packages ship an affected version, including mongodb-query-parser. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2020-24391 exists.","fix":"Upgrade mongodb-query-parser to 2.0.0 or later.","what":"CVE-2020-24391 is a critical code injection vulnerability in n/a, published on 30 Mar 2021. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2020-24391 and fix it if it is affected.\n\nWhat it is: CVE-2020-24391 is a critical code injection vulnerability in n/a, published on 30 Mar 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2020-24391 exists.\n\nAffected packages and fixed versions:\n- mongodb-query-parser (npm): affected all versions; fixed in 2.0.0\n- mongodb-query-parser (npm): affected all versions; fixed in 2.0.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-2020-24391/ (Markdown: https://insights.sbomify.com/CVE-2020-24391/index.md)","id":"CVE-2020-24391","markdown":"https://insights.sbomify.com/CVE-2020-24391/index.md","name":"CVE-2020-24391","record":{"aliases":["GHSA-hxmg-hm46-cf62"],"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":"none","summary":"Attackers can execute arbitrary code via unsafe handling of advanced syntax in the mongo-express web interface.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"mongo-express","vendor":"mongo-express_project"}],"cvss":{"score":9.8,"severity":"critical","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[],"description":"mongo-express before 1.0.0 offers support for certain advanced syntax but implements this in an unsafe way. NOTE: this may overlap CVE-2019-10769.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":1,"refs":[{"date":null,"kind":"nuclei","ref":"http/cves/2020/CVE-2020-24391.yaml","stars":null,"title":"Mongo-Express - Remote Code Execution"}],"tier":"weaponised"},"has_fix":true,"headline":"Remote code execution in mongo-express","id":"CVE-2020-24391","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"code_injection","year":"2020"},"n_packages":2,"n_references":2,"next":{"headline":"Improper Certificate Validation in twitter-stream","id":"CVE-2020-24392"},"packages":[{"ecosystem":"npm","fixed":["2.0.0"],"introduced":["0"],"last_affected":[],"package":"mongodb-query-parser","purl":null,"source":"GHSA-hxmg-hm46-cf62"},{"ecosystem":"npm","fixed":["2.0.0"],"introduced":["0"],"last_affected":[],"package":"mongodb-query-parser","purl":"pkg:npm/mongodb-query-parser","source":"GHSA-hxmg-hm46-cf62"}],"prev":{"headline":"Cross-site scripting in n/a","id":"CVE-2020-24390"},"products":["n/a"],"published":"2021-03-30","related":[{"cvss_score":9.9,"headline":"MongoDB mongo-express Remote Code Execution","id":"CVE-2019-10758","kev_date_added":"2021-12-10","published":"2019-12-24"},{"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":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["n/a"]},"summary":"Attackers can execute arbitrary code via unsafe handling of advanced syntax in the mongo-express web interface.","url":"https://insights.sbomify.com/CVE-2020-24391/"}