CVE

MongoDB Replica Set Check (CVE-2026-118383)

One standard unauthenticated MongoDB handshake per host classifies replica-set exposure for the CVE-2026-118383 catch-up use-after-free, race never triggered.

AuthorTrickest
100%

Notes on this workflow

How it works: one TCP connect, then exactly one OP_MSG hello frame (opCode 2013, flags 0, section kind 0, BSON {hello:1, $db:'admin'}) — the ordinary unauthenticated connection-establishment message every driver sends, valid even when authorization is enabled. Topology: setName/hosts/primary -> replica-set member; msg 'implicitly a standalone server' -> standalone (not_product); neither -> topology unknown. maxWireVersion: 9=4.4, 13=5.0, 17=6.0, 21=7.0, 25=8.0, >25 = 8.3/9.0 generation (train only, never patch level). SAFETY: the outgoing frame is one validated module constant whose BSON may contain only hello and $db — afterOpTime reads, replSetStepDown/replSetFreeze, buildInfo, SASL/SCRAM auth, fuzzed frames and second commands are refused by guard; single pass, no retries, one handshake per host.

Results: replica_set_exposed (HIGH — flag for patch verification; patch level always 'verify out-of-band'), mongodb_topology_unknown (UNKNOWN — mongod present, membership not provable remotely), not_product (INFO — standalone or non-mongo), transport error. Enrichment quotes both scores: NVD 10.0 AC:L vs MongoDB CNA 9.0 AC:H (CVSS 4.0 9.5) with the race-window rationale; KEV no; EPSS 0.71%; SSVC none/no-automatable/total. Remediation: 9.0.7/8.3.16/8.0.37/7.0.48/6.0.30/5.0.35/4.4.32+, network segmentation of 27017-27019, election-aware patch timing, no vendor workaround.

Target: mongod listeners on TCP 27017 (default), 27018 (shard members), 27019 (config servers). Only replica-set members are the affected deployment class — standalone mongod is not affected. Members bound to localhost or firewalled inside private networks are out of reach. Owner inventory may carry an exact version (the wire handshake does not expose the patch level).

Overview: exposure fingerprint for CVE-2026-118383 — use-after-free in CatchupState::abort() reachable via unauthenticated requests during a new primary's catch-up phase. Any probe that triggers the race crashes primaries, so detection is topology + train classification only. 4-node chain, fail-closed, JSONL outputs.

Overview

This workflow classifies MongoDB deployments for CVE-2026-118383, the use-after-free in the replication catch-up phase that can crash a newly elected primary and, under some conditions, run code in the server process. NVD scores it 10.0; MongoDB's own scores are 9.0 and 9.5. The reachability precondition is specific: replica set members only, standalone servers are not affected, and the race lives in requests a client can make. Triggering the race crashes primaries, so this workflow sends nothing beyond the standard handshake every MongoDB driver sends. Field context makes the scope clear: about 139,852 MongoDB services answer on 27017 across the family's sensor data, which is context for prioritization, not a finding. Each host comes back with a verdict you can feed into exposure management.

Pipeline

  1. Read the target list and make one TCP connect per host, then send exactly one unauthenticated OP_MSG hello handshake: the ordinary connection-establishment frame every driver sends, which works even on secured deployments.
  2. The outgoing frame is a single validated constant whose body can carry only the hello and $db keys. The race-triggering reads, election-forcing commands, authentication attempts, and malformed frames are refused by construction, and no second command is ever sent on a connection.
  3. Classify topology from the answer: a setName with hosts and a primary means a replica-set member, the affected deployment class; the implicit-standalone marker means standalone, not affected by this bug; anything else stays topology unknown.
  4. Map the handshake's wire version to the server train, never the patch level; exact patch versions come only from owner inventory, and patch level is always a verify-out-of-band field.
  5. Reconcile one verdict per target and write findings plus summary counts. Exposure only, never vulnerable: the vendor scores the race conditions as high-complexity.

Inputs

  • Target list. MongoDB host addresses, with optional ports, that you are authorized to test. The default file ships a sample host; bind your own.
  • Inventory file. Optional. Host-to-version rows from your asset system; the exact server version decides which of the seven fixed releases applies.

Outputs

  • findings.jsonl. One row per host: target, the handshake result, the topology classification, the wire version and its train, the inventory version where present, verdict, and severity.
  • summary.jsonl. One line with the total, verdict counts, and the seven fixed releases named.

Integrations

  • MongoDB wire protocol. One TCP connect and one validated hello frame per host, nothing else on the connection.

Sample output

The records below are illustrative and do not come from a real run. They show a replica-set member, a standalone server, and a host whose topology stays unknown.

targetporthandshaketopologyset_namewire_versiontraininventory_versionverdictdetailerror
mongo-a.example.com27017hello_okreplica_set_memberrs0217.07.0.40replica_set_exposedreplica-set member; verify the patch level against the 7.0.48 fix out of bandnull
mongo-b.example.org27017hello_okstandalonenull258.0nullnot_productstandalone server, not affected by the replication racenull
mongo-c.example.net27017hello_okunknownnull176.0nullmongodb_topology_unknownmongod answered but neither replica-set nor standalone marker presentnull
{"cve": "CVE-2026-118383", "product": "MongoDB Server replica sets", "total_targets": 3, "verdict_counts": {"replica_set_exposed": 1, "not_product": 1, "mongodb_topology_unknown": 1}, "fixed_releases": ["9.0.7", "8.3.16", "8.0.37", "7.0.48", "6.0.30", "5.0.35", "4.4.32"], "field_context": "about 139,852 MongoDB services observed on 27017, context only"}

FAQ

Why classify topology instead of testing the bug?

The race fires on requests a client can make, and a successful trigger crashes the primary. There is no safe version of that test from outside, so the workflow sends only the handshake every driver sends and sorts hosts by deployment class and version instead.

Does this affect standalone MongoDB servers?

No. The use-after-free lives in the replication catch-up path of a newly elected primary, so replica set members, including shard and config-server members of sharded clusters, are the affected class. Standalone servers come back as not affected by this bug.

Which versions are affected?

Seven trains carry the fix: 9.0.7, 8.3.16, 8.0.37, 7.0.48, 6.0.30, 5.0.35, and 4.4.32, or later. The handshake maps to the train but not the patch, so the exact build comparison needs your inventory or a host-side check.

What is CVE-2026-118383?

A use-after-free in the catch-up phase of a newly elected MongoDB primary, reachable through unauthenticated client requests. Not on CISA KEV and no confirmed exploitation; CISA's coordinator scored exploitation as none.

Get a personalized demo

See Trickest in Action

A 30-minute walkthrough. We map the platform to your stack and answer pricing and deployment questions for your environment.