One standard unauthenticated MongoDB handshake per host classifies replica-set exposure for the CVE-2026-118383 catch-up use-after-free, race never triggered.
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
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.
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.
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.
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.
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.
target
port
handshake
topology
set_name
wire_version
train
inventory_version
verdict
detail
error
mongo-a.example.com
27017
hello_ok
replica_set_member
rs0
21
7.0
7.0.40
replica_set_exposed
replica-set member; verify the patch level against the 7.0.48 fix out of band
null
mongo-b.example.org
27017
hello_ok
standalone
null
25
8.0
null
not_product
standalone server, not affected by the replication race
null
mongo-c.example.net
27017
hello_ok
unknown
null
17
6.0
null
mongodb_topology_unknown
mongod answered but neither replica-set nor standalone marker present
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.