A Critical Flaw in MongoDB Could Crash Your Servers
A recent discovery has raised alarms in the cybersecurity community: a critical flaw in MongoDB Server could allow an unauthenticated attacker to crash a database server under specific conditions. This vulnerability, identified as CVE-2026-118383, has been rated 9.5 out of 10 on the CVSS 4.0 severity scale, highlighting its potential impact on businesses that rely on MongoDB for data storage and management.
What Is the Flaw and How Does It Work?
The flaw allows an attacker to send two specific requests to a MongoDB server, which can lead to a crash if the server later becomes the primary in a replica set. A replica set is a group of MongoDB servers that maintain copies of the same data. One server, the primary, handles all new writes, while the others replicate them. If the primary becomes unavailable, the other members hold an election to choose a new primary.
The vulnerability is a use-after-free error, where the server uses memory that has already been freed. This can lead to a segmentation fault and a complete crash of the server. The flaw was discovered by researchers at Datadog Security Labs, who confirmed that even with authentication enabled, the two requests could still trigger the crash under certain conditions.
Who Is Affected and What Should You Do?
The flaw affects members of a replica set, including shard and config server members in sharded clusters. Standalone servers are not affected. MongoDB has released fixed versions for all affected branches, and customers using MongoDB Atlas clusters will automatically receive these updates during maintenance.
For self-managed deployments, it is crucial to apply the fixed release to every member of the replica set. After upgrading, verify that each member is running the correct version, including those in containers or that were offline during maintenance.
What Can You Do to Stay Safe?
Until all members can be upgraded, the researchers recommend restricting network access to the database to only the systems that need it. This can help limit who can send the two requests that trigger the flaw, although it does not fully resolve the issue.
MongoDB has also implemented two key fixes in the latest versions. The first ensures that only system users can use the readConcern.afterOpTime feature, which is used in the two requests. The second prevents the cleanup process from running twice, which was a key factor in the crash.
What Are the Signs of the Flaw in Logs?
If you suspect that your MongoDB server has been affected, you can look for specific log events that indicate the presence of the flaw. These include:
- A COMMAND "Slow query" entry (ID 51803) for an unauthenticated ping carrying readConcern.afterOpTime that ended with MaxTimeMSExpired.
- A member entering primary catch-up (ID 21359), then exiting it twice (ID 21363) in one transition.
- A fatal signal or backtrace involving CatchupState::abort_inlock() after those exits.
These signs can help you identify whether the flaw has been triggered in your environment.
What’s Next for MongoDB and Your Business?
MongoDB has stated that it discovered the flaw internally and is not aware of any attempts to exploit it. However, the company emphasizes the importance of applying the latest security patches as soon as possible. For businesses that rely on MongoDB, staying up to date with security updates is essential to protect against potential threats.
As the cybersecurity landscape continues to evolve, it is more important than ever to remain vigilant and proactive in securing your data. By understanding the risks and taking the necessary steps to protect your systems, you can help ensure the continued reliability and security of your business operations.
{{appel_action}}
Source : The Hacker News