# CVE-2026-118383: Use-after-free vulnerability in MongoDB

DevFeed: [CVE-2026-118383: Use-after-free vulnerability in MongoDB](<https://devfeed.tech/articles/cve-2026-118383-use-after-free-vulnerability-in-mongodb-130496.md>)

Original publisher: [Read original article](<https://securitylabs.datadoghq.com/articles/cve-2026-118383-mongodb-server-use-after-free/>)

Author: Sebastian Obregoso, Eslam Salem, Nick Frichette, Greg Foss, Julie Agnes Sparks

Published: 2026-11-11T00:00:00Z

Content type: news

Language: en

Sources: [Datadog Security Labs](<https://devfeed.tech/sources/datadog-security-labs.md>)

Topics: [MongoDB](<https://devfeed.tech/topics/mongodb.md>), [Memory Safety](<https://devfeed.tech/topics/memory-safety.md>), [cve remediation](<https://devfeed.tech/topics/cve-remediation.md>), [Exploit](<https://devfeed.tech/topics/exploit.md>)

Tags: [atlas](<https://devfeed.tech/tags/atlas.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [cloud-siem](<https://devfeed.tech/tags/cloud-siem.md>), [cluster](<https://devfeed.tech/tags/cluster.md>), [code-execution](<https://devfeed.tech/tags/code-execution.md>), [command](<https://devfeed.tech/tags/command.md>), [container](<https://devfeed.tech/tags/container.md>), [container-images](<https://devfeed.tech/tags/container-images.md>), [crash](<https://devfeed.tech/tags/crash.md>), [credentials](<https://devfeed.tech/tags/credentials.md>), [critical](<https://devfeed.tech/tags/critical.md>), [cve](<https://devfeed.tech/tags/cve.md>), [datadog](<https://devfeed.tech/tags/datadog.md>), [election](<https://devfeed.tech/tags/election.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [primary](<https://devfeed.tech/tags/primary.md>), [server](<https://devfeed.tech/tags/server.md>), [set](<https://devfeed.tech/tags/set.md>), [use-after-free](<https://devfeed.tech/tags/use-after-free.md>), [vulnerability](<https://devfeed.tech/tags/vulnerability.md>)

## AI overview

CVE-2026-118383 is a critical use-after-free affecting MongoDB replica set members when a newly elected primary finishes catch-up; standalone `mongod` instances are unaffected. In a lab, two unauthenticated `ping` requests with `readConcern.afterOpTime` planted stale waiters, and a later election and replication lag caused the new primary to crash during cleanup. Attackers cannot trigger the lag or election, and the test demonstrated a crash, not code execution. Authentication does not block the requests. Upgrade every affected member to a fixed release, verify versions across the set, and restrict network access while upgrading. For detection, inspect structured logs for unusual unauthenticated `afterOpTime` requests, followed by two catch-up exits and a fatal signal or `CatchupState::abort_inlock` backtrace. Detection depends on logging and retention settings; remote address fields may not identify the original client. Datadog also provides vulnerability findings, exposure checks, and SIEM detections, though its unauthenticated-connection signal alone is not proof of exploitation.

## Source excerpt

We reproduced CVE-2026-118383, a critical use-after-free in MongoDB Server's primary catch-up process that unauthenticated clients can set up, and explain how to detect and remediate it.