VMTech
Discuss a project →

MongoDB patches CVE-2026-118383 replica-set failover crash

MongoDB patches CVE-2026-118383 replica-set failover crash

MongoDB has released fixes for CVE-2026-118383, a critical pre-authentication vulnerability in MongoDB Server rated 9.5 out of 10 under CVSS 4.0. The flaw can allow an unauthenticated client to send two requests that later crash a replica-set member if that lagging member is elected primary and completes its catch-up process.

Datadog Security Labs reproduced the condition in a laboratory replica set. On MongoDB 8.0.34, the selected member crashed with a segmentation fault, leaving the lab cluster without a primary. In the fixed 8.0.37 release, the server rejected the two requests as unauthorized and the member continued running.

Failover-dependent use-after-free condition

The issue is a use-after-free in cleanup performed after a newly elected primary catches up on writes it missed. Replica sets replicate data across members: the primary accepts new writes, while secondary members copy them. When the primary is unavailable, the remaining members elect a replacement. A member elected while behind must apply missing writes before accepting new ones.

The two triggering requests are ping commands containing readConcern.afterOpTime. They cause the server to retain pending notifications, or waiters, while replication reaches a specified point. The requests themselves do not crash the target, and the waiters remain until the member restarts, rolls back, or steps down from primary.

The crash requires the targeted member to later win an election while still behind another member. Datadog Security Labs said the cleanup can then execute twice after catch-up, reusing memory that has already been freed. Once those conditions are present, the observed crash does not depend on a timing race. The researchers used administrative access in their test environment to make a member lag and force failover; the unauthenticated client only sent the two ping requests and could not write data.

Affected deployments and remediation

Affected systems include replica-set members, as well as shard and config server members in sharded clusters. A standalone mongod deployment outside a replica set is not affected. MongoDB states that every earlier release in each affected branch is vulnerable back to that branch's first release, and has published fixed versions for those branches.

MongoDB Atlas clusters are scheduled to receive fixed versions during maintenance. Customers that defer maintenance should apply the update promptly. For self-managed environments, MongoDB advises upgrading every replica-set member and confirming the running version on all nodes, including containerised systems and members that were offline during maintenance.

The 8.2 branch was not listed among the affected versions, and its latest release is 8.2.12. However, a GitHub proof of concept reported that 8.2.12 displayed the bug in a lab using a test-only setting. MongoDB's lifecycle schedule lists the branch as end of life from July 31, meaning it no longer receives fixes, including security updates.

Detection signals and interim controls

Until upgrades are complete, Datadog Security Labs recommends limiting database network access to systems that require it. That reduces the number of clients able to send the requests, but it does not remove the vulnerability. Enabling authentication alone does not prevent the planting requests on vulnerable versions.

Administrators can review structured logs for an unauthenticated ping with readConcern.afterOpTime that ends in MaxTimeMSExpired, recorded as a COMMAND “Slow query” event with ID 51803. The researchers also identify a member entering primary catch-up with ID 21359 and exiting it twice with ID 21363 during one transition, followed by a fatal signal or backtrace involving CatchupState::abort_inlock(). A normal election or one catch-up exit is not, by itself, evidence of this issue.

MongoDB said it was not aware of attempts to exploit the flaw and noted that it may result in arbitrary code execution under certain conditions. Datadog Security Labs did not achieve code execution in its testing, and the proof-of-concept author described a crash or memory-corruption impact rather than code execution. The practical business priority is to deploy the fixed release consistently, validate every replica-set member, and use log review and network restrictions only as interim safeguards.

#mongodb#databasesecurity#vulnerability#replication
Open analytics
On the site 5 views
min read 5 12.11.2026
Instagram

MongoDB patches CVE-2026-118383 replica-set failover crash

Open the post on Instagram ↗