Critical Pre‑Auth MongoDB Flaw (CVE‑2026‑118383) Can Crash Lagging Replica Set Members on Failover
· GlobeWire Daily Editorial Desk · Source: thehackernews.com

Summary
A newly disclosed use‑after‑free vulnerability (CVE‑2026‑118383) lets an unauthenticated attacker send two specially‑crafted `ping` commands to a MongoDB replica‑set member. If that member later becomes primary while still lagging behind, the server crashes during the catch‑up cleanup. The flaw affects all versions of the 8.0, 8.1 and 8.2 branches that are part of a replica set; stand‑alone `mongod` instances are not vulnerable.
Technical Details
- Vulnerability type: Use‑after‑free in the catch‑up cleanup routine.
- CVSS 4.0 score: 9.5 / 10.
- Trigger: Two unauthenticated `ping` commands with a `readConcern.afterOpTime` value. The server records a *waiter* for each request.
- Crash condition: The member that received the waiters must later win an election and become primary while still behind another member. The cleanup runs twice, re‑using freed memory, causing a segmentation fault.
- Impact: Server crash (loss of primary) and potential memory corruption; code execution was not demonstrated.
Affected Deployments
- Replica‑set members (primary or secondary) in sharded clusters, including shard and config servers.
- Versions: All releases in the 8.0, 8.1 and 8.2 branches prior to the fixed patches (e.g., 8.0.34, 8.1.x, 8.2.x). The 8.2 branch reached end‑of‑life on 31 July 2026, so it no longer receives fixes.
- Unaffected: Stand‑alone `mongod` instances and any deployment where the member is not part of a replica set.
Mitigation & Fixes
- MongoDB releases: Fixed versions are 8.0.37, 8.1.23 and 8.2.12 (the latter still shows the bug in a lab‑only test setting). Apply the latest patch for your branch.
- Atlas users: Automatic upgrade during scheduled maintenance; deferers should trigger the upgrade immediately.
- Self‑managed clusters: Upgrade every replica‑set member, including containers and offline nodes. Verify the version with `mongod --version` after upgrade.
- Short‑term controls: Restrict network access to the database to trusted hosts only. This limits who can send the malicious ping requests but does not eliminate the flaw.
Detection
Check MongoDB structured logs for the following sequence on a member that later crashes:
- `COMMAND "Slow query"` entry (ID 51803) for an unauthenticated ping with `readConcern.afterOpTime` ending in `MaxTimeMSExpired`.
- A `member entering primary catch‑up` event (ID 21359) followed by two `member exiting catch‑up` events (ID 21363) in the same transition.
- A fatal signal or backtrace referencing `CatchupState::abort_inlock()`.
Normal elections or a single catch‑up exit do not indicate exploitation.
Verification Steps
- Run `db.version()` on each replica‑set member to confirm the patched version.
- Review the replica‑set configuration with `rs.status()` to ensure all members are up‑to‑date.
- Enable structured logging (`systemLog.verbosity: 1`) and monitor for the log IDs listed above.
- Test the fix in a staging environment by attempting the two‑request sequence; the server should reject the requests with an *unauthorized* error.
Practical Implications
- Organizations running MongoDB on‑premises or in private clouds must prioritize the upgrade; a crash during a failover can cause downtime and data‑availability issues.
- Cloud‑hosted Atlas customers are largely protected if they accept automatic maintenance, but they should still verify the upgrade status.
- The vulnerability does not allow remote code execution under normal conditions, but the crash can disrupt services and trigger a cascade of failovers.
--- *All information is based on the security advisory released by MongoDB and the research published by Datadog Security Labs.*



