CVE-2025-6706 Running certain aggregation operations with the SBE engine may lead to unexpected behavior on MongoDB Server

Medium 5.0 Published Updated

An authenticated user can cause a MongoDB Server crash via a use-after-free vulnerability in the SBE engine during specific aggregation operations.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-6706?

CVE-2025-6706 is a medium-severity use after free vulnerability in Mongodb Mongodb, published on 26 Jun 2025. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

An authenticated user may trigger a use after free that may result in MongoDB Server crash and other unexpected behavior, even if the user does not have authorization to shut down a server. The crash is triggered on affected versions by issuing an aggregation framework operation using a specific combination of rarely-used aggregation pipeline expressions. This issue affects MongoDB Server v6.0 version prior to 6.0.21, MongoDB Server v7.0 version prior to 7.0.17 and MongoDB Server v8.0 version prior to 8.0.4 when the SBE engine is enabled.

Weakness: CWE-416

Which versions are affected by CVE-2025-6706?

1 open source package ship an affected version, including mongodb. It affects 1 product.

PackageAffectedFixed in
mongodb BitnamiFrom 6.0.06.0.21, 7.0.17, 8.0.4

Products include Mongodb Mongodb.

How do I fix CVE-2025-6706?

Upgrade mongodb to a fixed version for your release line: 6.0.21, 7.0.17 or 8.0.4.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2025-6706 being exploited?

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

All Mongodb Mongodb vulnerabilities

Sources

Also known as BIT-mongodb-2025-6706, GHSA-9pjr-27w4-fm42, MINI-rcp9-8c3w-j3w5, UBUNTU-CVE-2025-6706.

Is CVE-2025-6706 in your software?

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

Check your SBOMs for free