{"answers":{"affected":"2 open source packages ship an affected version, including @mongodb-js/connection-form. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-6376 in the wild and no public exploit code.","fix":"Upgrade @mongodb-js/connection-form to 1.20.1 or later.","what":"CVE-2024-6376 is a high-severity code injection vulnerability in MongoDB Compass, published on 1 Jul 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-6376 and fix it if it is affected.\n\nWhat it is: CVE-2024-6376 is a high-severity code injection vulnerability in MongoDB Compass, published on 1 Jul 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2024-6376 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @mongodb-js/connection-form (npm): affected all versions; fixed in 1.20.1\n- @mongodb-js/connection-form (npm): affected all versions; fixed in 1.20.1\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-2024-6376/ (Markdown: https://insights.sbomify.com/CVE-2024-6376/index.md)","id":"CVE-2024-6376","markdown":"https://insights.sbomify.com/CVE-2024-6376/index.md","name":"CVE-2024-6376","record":{"aliases":["GHSA-jxr4-4prv-mh83"],"analysis":{"component_type":"desktop_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"MongoDB Compass","requires_auth":"none","summary":"Attackers can execute arbitrary code via the ejson shell parser in MongoDB Compass due to insufficient sandbox protection.","user_interaction":"required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mongodb","cpe":[{"product":"compass","vendor":"mongodb"}],"cvss":{"score":7,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"},{"id":"CWE-20","name":"Improper Input Validation"}],"description":"MongoDB Compass may be susceptible to code injection due to insufficient sandbox protection settings with the usage of ejson shell parser in Compass' connection handling. This issue affects MongoDB Compass versions prior to version 1.42.2","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"ejson shell parser in MongoDB Compass maybe bypassed","id":"CVE-2024-6376","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"code_injection","year":"2024"},"n_packages":2,"n_references":1,"next":{"headline":"Open redirect in 3DSwymer","id":"CVE-2024-6377"},"packages":[{"ecosystem":"npm","fixed":["1.20.1"],"introduced":["0"],"last_affected":[],"package":"@mongodb-js/connection-form","purl":null,"source":"GHSA-jxr4-4prv-mh83"},{"ecosystem":"npm","fixed":["1.20.1"],"introduced":["0"],"last_affected":[],"package":"@mongodb-js/connection-form","purl":"pkg:npm/%40mongodb-js/connection-form","source":"GHSA-jxr4-4prv-mh83"}],"prev":{"headline":"Missing authorization check may lead to shard key refinement","id":"CVE-2024-6375"},"products":["MongoDB Compass"],"published":"2024-07-01","related":[{"cvss_score":8.4,"headline":"Command injection in MongoDB Compass","id":"CVE-2026-14881","kev_date_added":null,"published":"2026-07-22"},{"cvss_score":7.5,"headline":"MongoDB Compass may be susceptible to local privilege escalation in Windows","id":"CVE-2025-1755","kev_date_added":null,"published":"2025-02-27"},{"cvss_score":7.1,"headline":"Insufficient validation of external input in Compass may enable MITM attacks","id":"CVE-2024-3371","kev_date_added":null,"published":"2024-04-24"},{"cvss_score":5.3,"headline":"Prototype pollution in csv parsing","id":"CVE-2026-9101","kev_date_added":null,"published":"2026-05-20"},{"cvss_score":4.8,"headline":"Local privilege escalation in MongoDB Compass for Windows","id":"CVE-2021-20334","kev_date_added":null,"published":"2021-04-06"}],"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":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-01","vendors":["MongoDB Inc"]},"summary":"Attackers can execute arbitrary code via the ejson shell parser in MongoDB Compass due to insufficient sandbox protection.","url":"https://insights.sbomify.com/CVE-2024-6376/"}