On this page (7 sections)

MongoDB has released fixes for CVE-2026-118383, a critical use-after-free in the replication code of MongoDB Server. Requests that need no authentication can plant state on a replica set member that later causes the server to crash when that member is elected primary. MongoDB also says arbitrary code execution in the server process may be possible under certain conditions, though researchers who reproduced the crash did not achieve it.

If you run self-managed MongoDB replica sets or sharded clusters, including the config server and shard members, this applies to you. Standalone mongod instances are not affected.

What happened

The flaw is described in the GitHub advisory and the NVD record, which repeats the same text. It was published on November 10, 2026. The fixes are tracked in two MongoDB tickets, SERVER-138119 and SERVER-138175, both resolved on November 10.

According to The Hacker News, MongoDB found the flaw itself and said it was not aware of attempts to exploit it. Researchers at Datadog Security Labs reproduced the crash in a lab and published their analysis on November 11. Treat that as a lab result, not evidence of attacks in the wild.

How the flaw works

A use-after-free means the server keeps using a piece of memory after it has been released. That usually ends in a crash, and in some cases in memory corruption that an attacker can steer.

Per the reporting on the Datadog findings, the bug sits in the cleanup that runs when a newly elected primary finishes its catch-up phase, where it applies writes it missed before accepting new ones. Two ping requests carrying a readConcern.afterOpTime value make the server record pending notifications. These do not crash anything by themselves and stay in place until the member restarts, rolls back or steps down. If that member later wins an election while still behind, the cleanup runs twice over memory that was already freed, and the new primary crashes before it accepts writes.

  • The two requests do not require authentication, and on vulnerable versions turning on authentication does not stop them.
  • The attacker cannot make the member fall behind, win an election, or see when either happens, according to the researchers. The crash therefore depends on a failover or lag event happening later.
  • In the researchers' lab on version 8.0.34, the member crashed with a segmentation fault and the cluster was left without a primary. Another deployment might elect a new primary and keep running.
  • The lab did not demonstrate code execution. MongoDB's wording is that it may be possible under certain conditions.

The CVSS v4 metrics list a network attack vector, high attack complexity, and no privileges or user interaction required. High complexity fits the need for a later election of a lagging member.

Who is affected

Replica set members are affected, as are shard and config server replica set members in sharded clusters. A single standalone mongod outside any replica set is not. Per The Hacker News, every earlier version in an affected branch is affected, back to the branch's first release.

MongoDB Atlas clusters receive fixed versions automatically during maintenance, according to the company's security announcement as reported. If you defer maintenance windows, apply the upgrade as soon as you can.

The 8.2 branch is unclear

The 8.2 branch is not among the affected versions listed, and its newest release is 8.2.12. However, a proof of concept published on GitHub reports that 8.2.12 still showed the bug in a lab test that used a test-only setting. That is unconfirmed by MongoDB in the sources available. The 8.2 branch also reached end of life on July 31, so it no longer receives security fixes. If you run 8.2, plan a move to a supported branch.

Fixed releases listed in the MongoDB tickets
BranchFixed release
4.44.4.32
5.05.0.35
6.06.0.30
7.07.0.48
8.08.0.37
8.38.3.16
9.09.0.7
9.19.1.0-rc0

How to check your exposure

First work out which of your MongoDB deployments are replica sets rather than standalone servers, then check each member's version against the table above. Include containers and any member that was offline during earlier maintenance.

This read-only command prints the server version. Run it in a shell on each host and compare the result with the fixed releases:

Print the installed mongod version (run on each member host)Shell
mongod --version

This mongosh command returns the version of the server you are connected to, which is useful for containers and remote members. It only reads information:

Show the running server version (run in mongosh, connected to each member)JavaScript
db.version()

This lists the members of the replica set and their states, so you can confirm you have checked every one, including config server and shard members. Look for any member you had not accounted for:

List replica set members and their states (run in mongosh on a member)JavaScript
rs.status().members.map(m => ({ name: m.name, state: m.stateStr }))

What to do now

  1. List every MongoDB deployment and mark which are replica sets, shard members or config servers.
  2. Check the running version on each member with the commands above, including containers.
  3. Upgrade each member to the fixed release for its branch. Atlas customers should confirm that maintenance has been applied.
  4. Re-check the version on every member after the upgrade, including any that were offline during the maintenance.
  5. If you are on 8.2 or another branch that no longer gets fixes, plan an upgrade to a supported fixed branch.
  6. Until you can upgrade, restrict network access so only the application servers and other cluster members can reach the database ports.
  7. Review who can reach MongoDB from the internet and close any exposure that is not needed.
Caution. Upgrading a replica set member restarts it and can trigger an election. Follow MongoDB's documented rolling upgrade procedure for your branch, upgrade secondaries before the primary, and schedule it for a low-traffic window.
Tip. Network restriction limits who can send the two requests, but it does not fix the flaw. Treat it as a stopgap until every member runs a fixed release.

MongoDB's fix has two parts as described in the reporting: only system users can use readConcern.afterOpTime, and the cleanup no longer runs twice even when waiters already exist. In the fixed 8.0.37 the researchers saw both requests rejected as unauthorized at once, and the member kept running.

Detection and monitoring

There is no published indicator of compromise for this flaw, and no exploitation has been reported. The practical signals are operational, so watch for them after you patch.

  • Unexpected mongod crashes or restarts, especially right after an election or failover.
  • Replica sets that briefly or repeatedly have no primary.
  • Connections to database ports from addresses that are not your application servers or cluster members.
  • Members still reporting an old version after a maintenance window.

Database ports should not be reachable from the open internet. An outside-in Webforta Scan of a site you verify can help you spot services that are unexpectedly exposed, and Webforta Monitor can alert you to availability and certificate changes, but neither replaces upgrading the database itself. For broader hardening, see our small business website security guide.

Bottom line

CVE-2026-118383 is serious on paper, but exploiting it needs a later election of a lagging member that an attacker cannot control, and no exploitation is known. Because the trigger requests need no credentials, upgrading every replica set member to a fixed release is the right fix, and restricting network access is the interim measure.

Sources

This article is based on the public sources below. Details can change as vendors and researchers publish more; check the original advisories before acting on version numbers.

  1. CVE-2026-118383 - GitHub Advisory Databasegithub.com
  2. Loading...jira.mongodb.org ·
  3. Loading...jira.mongodb.org ·
  4. Critical Pre-Auth MongoDB Flaw (CVE-2026-118383) Can Crash Lagging Servers on Failoverthehackernews.com ·
  • MongoDB
  • CVE-2026-118383
  • use-after-free
  • database security
  • replica set