MongoDB published CVE-2026-118383 on November 10: a use-after-free in the replication code that runs when a newly elected primary finishes catch-up. MongoDB scored it 9.5 on CVSS 4.0, critical, with no authentication required. Replica set members are affected, including shard and config server members. A standalone mongod is not.
The mechanism is the interesting part, so here it is. An unauthenticated client sends two ping commands carrying readConcern.afterOpTime. Each one makes the server record a waiter. Those waiters don’t expire. They sit there until the member restarts, rolls back or steps down. Nothing crashes yet. Then, some day, that member falls behind, wins an election anyway, and starts its catch-up phase. When catch-up ends, the cleanup runs twice over memory that’s already freed. Per Datadog Security Labs, via The Hacker News, the new primary segfaults before it accepts a write.
Datadog reproduced it on 8.0.34 and got a crash and a primaryless lab cluster. They did not get code execution. MongoDB’s advisory text says execution is possible “under certain conditions.” Both statements can be true. A crash is the floor, not the ceiling.
Two things keep this from being the end of the world. An attacker can’t make the member lag, can’t make it win, and can’t see either happen, so the trigger depends on your cluster having a bad day. MongoDB also says it found the bug itself and knows of no exploitation. But a time bomb that arms on an unauthenticated request and detonates during your next failover is precisely the kind of bug that picks the worst possible moment. Failover is already the moment you least want a surprise.
Fixed releases are on the Jira tickets: 8.0.37, 7.0.48, 6.0.30, 5.0.35, 4.4.32, 8.3.16 and 9.0.7. The fix has two parts: only system users may use readConcern.afterOpTime (SERVER-138119), and the cleanup no longer runs twice (SERVER-138175). Datadog verified the first part, not the second.
The 8.2 branch is not on the affected list, but a public proof of concept reports 8.2.12 still crashing in a lab with a test-only setting, and 8.2 went end of life on July 31. If you’re on 8.2, stop treating that as a comfortable place to sit.
What to do, in order:
- Upgrade every replica set member, including containers and anything that was offline during your last maintenance window. Check what each one reports; don’t assume.
- Until then, firewall
mongodto the hosts that need it. That limits who can send the pings. It doesn’t fix the bug. Enabling auth does not stop the pings on vulnerable versions either. - Grep the structured logs for an unauthenticated
pingwithreadConcern.afterOpTimeending inMaxTimeMSExpired(a slow query entry, ID 51803), a member entering primary catch-up (21359) and then exiting twice (21363) in one transition, and a fatal signal mentioningCatchupState::abort_inlock(). Check logs from before the failover; the requests arrive earlier. Andattr.remotemay show loopback, so don’t trust it.
Opinion: a database that listens on a network for commands from strangers and keeps their state in a long-lived in-process structure is asking for this. Authentication is supposed to be the first gate, and here it isn’t even the first line of code that runs. The habit that actually helps is the boring one in the sandboxing hub: keep the daemon on a private interface, and let the kernel and security hub remind you how rarely “it’s internal” holds up. See also yesterday’s Apache mod_http2 hole, which bites on a similar premise: lots of unglamorous parsing code, reachable before anyone checks who you are.
