1-minute read of a 4 min report

MongoDB flaw crashes newly elected replica primaries

By

1-minute read

What a defender needs to know

A MongoDB replica-set member can crash when it becomes primary and finishes catching up if two stale waiters are already present. Datadog Security Labs reproduced the crash on 8.0.34 after unauthenticated requests; the same failover without those requests stayed up, and fixed 8.0.37 rejected the requests. MongoDB’s CVE record also lists possible code execution under certain conditions; Datadog demonstrated a crash. Replica-set members in sharded clusters, including shard and config-server sets, are in scope. Standalone mongod is outside this catch-up path.

Search each member’s earlier structured server logs for ID 51803 with attr.command.ping, attr.command.readConcern.afterOpTime, and attr.errName = MaxTimeMSExpired. Correlate an entry into primary catch-up, ID 21359, duplicate exit events, ID 21363, and SIGSEGV or CatchupState::abort_inlock(). Slow-operation sampling, command verbosity and log pipelines affect whether the command object survives; attr.remote may identify a loopback peer.

Upgrade every replica-set member to a fixed release: 9.0.7, 8.3.16, 8.0.37, 7.0.48, 6.0.30, 5.0.35, or 4.4.32 for its matching branch. Include containers and nodes offline during maintenance. Restrict listener reachability to necessary systems until the upgrade finishes; authentication alone leaves the described pre-login path open on a vulnerable server. Confirm the running version on each member against its fixed branch release.

Primary sources