Description

MongoDB has addressed a critical use-after-free vulnerability, tracked as CVE-2026-118383, with a CVSS score of 9.5 (Critical). The vulnerability affects MongoDB replica set members and can be exploited remotely by unauthenticated attackers. Successful exploitation may cause server crashes and, under certain conditions, arbitrary code execution within the MongoDB server process. The vulnerability exists in MongoDB's replication component and is triggered when a newly elected replica set primary completes its catch-up phase. During this process, attackers can send unauthenticated ping commands containing specially crafted readConcern.afterOpTime values, creating stale waiters that persist until a restart, rollback, or step-down event. When the affected replica set member subsequently falls behind and wins a primary election, the catch-up cleanup process may execute twice and access previously freed memory, resulting in a use-after-free condition. This can cause a segmentation fault and terminate the MongoDB process. Under certain conditions, the vendor also identifies the possibility of arbitrary code execution. The vulnerability affects replica set members, including shard and configuration server members in sharded clusters. Standalone MongoDB instances are not affected. Enabling authentication alone does not mitigate the vulnerability.