Cloudanix VulnDB

CVE-2024-8305

Medium · 6.5

CVSS

6.5

EPSS

0.6%

Published

Oct 21, 2024

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in database software can make backup copies fail and leave the main database unreachable until the issue is corrected.

Exploitation
Remote Authenticated
Attacker needs
Low Privilege
Complexity
Moderate
Impact
Denial Of Service
Component
Application
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

A flaw in prepareUnique index constraint enforcement on replica set secondaries allows crafted operations to trigger crashes, and in extreme cases multiple secondaries may fail leaving no primary.

Why it matters to the business

Replica set availability can be lost, causing application downtime and requiring manual intervention to restore a primary node.

How an attack unfolds

An attacker with write access identifies a collection using prepareUnique indexes and issues targeted write operations that expose the incorrect secondary constraint handling, resulting in secondary crashes that can cascade to loss of a primary.

How to fix it

Upgrade MongoDB Server to 6.0.17 or later, 7.0.13 or later, or 7.3.4 or later; the fix is present in commit a2a46542e8d79a8b4937ed51e84dc918caf26783.

How to confirm the fix worked

Confirm the running MongoDB version meets or exceeds the listed fixed releases and inspect replica set status and logs for absence of prepareUnique-related secondary crashes.

Typical attack path

  1. Locate a MongoDB collection configured with a prepareUnique index
  2. Issue write operations that trigger secondary-specific index constraint checks
  3. Cause repeated crashes on secondaries until no primary remains

How to detect it

Examine MongoDB server logs on secondaries for repeated crashes mentioning prepareUnique indexes or index constraint enforcement failures.

What your security team should do

  • Apply the fixed MongoDB versions to all affected replica sets without delay
  • Review replica set logs for prior secondary crashes tied to index enforcement
  • Validate failover behavior in staging environments after upgrade

The record

prepareUnique index may cause secondaries to crash due to incorrect enforcement of index constraints on secondaries, where in extreme cases may cause multiple secondaries crashing leading to no primaries. This issue affects MongoDB Server v6.0 versions prior to 6.0.17, MongoDB Server v7.0 versions prior to 7.0.13 and MongoDB Server v7.3 versions prior to 7.3.4

Affected packages

Ecosystem Package Introduced Fixed
Bitnami mongodb 6.0.0 6.0.17
Ubuntu:14.04:LTS mongodb 0 No fix
Ubuntu:16.04:LTS mongodb 0 No fix
Ubuntu:18.04:LTS mongodb 0 No fix
Ubuntu:20.04:LTS mongodb 0 No fix
Ubuntu:Pro:14.04:LTS mongodb 0 No fix
Ubuntu:Pro:16.04:LTS mongodb 0 No fix
Ubuntu:Pro:18.04:LTS mongodb 0 No fix
Ubuntu:Pro:20.04:LTS mongodb 0 No fix

Related vulnerabilities