CVE-2026-118383
A use-after-free in the replication component of MongoDB Server can occur when a newly elected replica set primary completes catch-up.
Impact
A use-after-free in the replication component of MongoDB Server can occur when a newly elected replica set primary completes catch-up. The condition can be caused by requests that do not require authentication, and may result in the server terminating unexpectedly or, under certain conditions, arbitrary code execution in the context of the server process. Replica set members are affected, including the shard and config server replica set members of sharded clusters; standalone mongod instances are not.
An attacker can exploit this over the network, without logging in, without any action by a user. Specific conditions have to be met, which makes an attack harder. If it succeeds: high risk of data being read, high risk of data or systems being changed, high risk of outages. The attack can reach beyond the vulnerable component itself.
Affected products
| Vendor | Product | Affected versions |
|---|---|---|
| MongoDB | MongoDB | from 4.4.0 before 4.4.32 from 5.0.0 before 5.0.35 from 6.0.0 before 6.0.30 from 7.0.0 before 7.0.48 from 8.0.0 before 8.0.37 from 8.3.0 before 8.3.16 |
| MongoDB | MongoDB Server | from 9.0.0 before 9.0.7 from 8.3.0 before 8.3.16 from 8.0.0 before 8.0.37 from 7.0.0 before 7.0.48 from 6.0.0 before 6.0.30 from 5.0.0 before 5.0.35 |
| MongoDB, Inc. | MongoDB Server | from 5.0.0 before 5.0.35 from 4.4.0 before 4.4.32 from 6.0.0 before 6.0.30 from 8.0.0 before 8.0.37 from 9.0.0 before 9.0.7 from 8.3.0 before 8.3.16 |