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

High 7.0 Published Updated

Attackers can execute arbitrary code via the ejson shell parser in MongoDB Compass due to insufficient sandbox protection.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-6376?

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.

Official 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

Weakness: CWE-94, CWE-20

Which versions are affected by CVE-2024-6376?

2 open source packages ship an affected version, including @mongodb-js/connection-form. It affects 1 product.

PackageAffectedFixed in
@mongodb-js/connection-form npmAll versions1.20.1
@mongodb-js/connection-form npmAll versions1.20.1

Products include Mongodb Compass.

How do I fix CVE-2024-6376?

Upgrade @mongodb-js/connection-form to 1.20.1 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2024-6376 being exploited?

There is no known exploitation of CVE-2024-6376 in the wild and no public exploit code.

Sources

Also known as GHSA-jxr4-4prv-mh83.

Is CVE-2024-6376 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free