← Back to Patch Radar
PATCH RADAR / CVE-2026-118383

CVE-2026-118383: MongoDB replication use-after-free — patch replica sets

Unauthenticated use-after-free in MongoDB Server replication can crash or compromise replica set members. Check your MongoDB version and upgrade to a fixed release.

Critical · CVSS-B 4.0 · 9.5 · CVE disclosed
Published by phil.on on
THE FLAW, SIMPLY EXPLAINED

How this vulnerability works

MongoDB keeps several copies of a database in sync. A flaw in how a newly promoted leader copy catches up could let unauthenticated requests crash the server or, in some conditions, run attacker code.

  1. How it starts

    A leader copy is promoted

    In a group of database copies, one acts as leader and the rest follow. When leadership moves to a different copy, that copy must catch up on changes it missed while it was a follower.

  2. What goes wrong

    Memory is freed too early

    During that catch-up, the server mishandles a piece of its working memory, releasing it while it is still needed and then reusing it. The source says requests that need no login can trigger this.

  3. What it means for you

    Server may stop or be taken over

    The database server could shut down unexpectedly, disrupting service. Under certain conditions, an attacker could run their own code with the database's privileges. The source does not say this has happened in the wild.

A simplified explanation of the reported flaw. Actual risk depends on the affected version and how the system is used.

Affected products

  • MongoDB Server (mongodb / mongodb)
    • 9.0.0 to < 9.0.7 — affected
    • 8.3.0 to < 8.3.16 — affected
    • 8.0.0 to < 8.0.37 — affected
    • 7.0.0 to < 7.0.48 — affected
    • 6.0.0 to < 6.0.30 — affected
    • 5.0.0 to < 5.0.35 — affected
    • 4.4.0 to < 4.4.32 — affected
  • Scope: replica set members, including shard and config server replica set members of sharded clusters. Standalone mongod instances are not affected.
  • CVSS v3.1: 10.0 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H)
  • MongoDB MongoDB Server ↗
    MongoDB / MongoDB Server: 9.0.0 | < 9.0.7 | affected | semver; 8.3.0 | < 8.3.16 | affected | semver; 8.0.0 | < 8.0.37 | affected | semver; 7.0.0 | < 7.0.48 | affected | semver; 6.0.0 | < 6.0.30 | affected | semver; 5.0.0 | < 5.0.35 | affected | semver; 4.4.0 | < 4.4.32 | affected | semver

Why it matters

A use-after-free flaw exists in the replication component of MongoDB Server. It can be triggered when a newly elected replica set primary completes catch-up, and the condition can be caused by requests that do not require authentication. Successful triggering may cause the server to terminate unexpectedly, and under certain conditions may allow arbitrary code execution in the context of the server process.

Replica set members are in scope, including shard and config server replica set members of sharded clusters. Standalone mongod instances are not affected. Because the trigger does not require authentication and has a network attack vector, exposed replica set members should be treated as high priority for patching.

Checks and remediation

What to check

  1. Inventory every MongoDB Server deployment and record its exact version. On each host, run mongod --version or inspect the version reported by your deployment tooling.
  2. Determine the topology: standalone mongod instances are not affected, but any replica set member, including shard and config server replica set members of sharded clusters, is in scope.
  3. Compare the installed version against the affected ranges: 9.0.0 to < 9.0.7, 8.3.0 to < 8.3.16, 8.0.0 to < 8.0.37, 7.0.0 to < 7.0.48, 6.0.0 to < 6.0.30, 5.0.0 to < 5.0.35, and 4.4.0 to < 4.4.32.
  4. Confirm with the vendor advisory (jira.mongodb.org issues SERVER-138119 and SERVER-138175) which fixed release applies to your branch before scheduling changes.

Remediation steps

  1. Upgrade affected replica set members to a fixed MongoDB Server release for their branch, following the vendor advisory for the exact target version.
  2. Self-hosted Ubuntu/Linux: install the vendor-provided fixed package for your distribution and MongoDB branch using your package manager, then perform a rolling restart of replica set members so the primary election process and replication catch-up run on the patched binary.
  3. AWS: if you run MongoDB Server yourself on EC2 or other customer-managed hosts, you are responsible for patching; apply the fixed package or redeploy updated images as in step 2. If you use a managed MongoDB service, confirm with the provider whether it has applied the fix.
  4. GCP: if you run MongoDB Server yourself on Compute Engine or other customer-managed hosts, you are responsible for patching; apply the fixed package or redeploy updated images as in step 2. If you use a managed MongoDB service, confirm with the provider whether it has applied the fix.
  5. If immediate upgrade is not possible, apply only reversible defensive measures such as restricting network access to replica set ports to trusted clients, and plan the upgrade as soon as practicable. The source does not confirm a workaround.
  6. Verify after remediation: re-run mongod --version on every member and confirm it reports a version outside all affected ranges; confirm the replica set and sharded cluster report healthy status with all members online and no unexpected election churn.

Patch status

Patch status unconfirmed.

Workarounds

Workaround not documented.

CVSS and CWE

CVSS-B 4.0 · 9.5 · mongodb ↗
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Additional CVSS assessments by source and scope
  • CVSS-B 4.0 · 9.5 · [email protected] ↗
    CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • CVSS 3.1 · 9.0 · [email protected] ↗
    CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
  • CVSS 3.1 · 10.0 · [email protected] ↗
    CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
  • CVSS-B 4.0 · 9.5 · mongodb ↗
    CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
  • CVSS 3.1 · 9.0 · mongodb ↗
    CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H

References

SHARE THIS NOTE