Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-82052

CVE-2026-82052: MongoDB Server DOS Vulnerability

CVE-2026-82052 is a denial of service vulnerability in MongoDB server affecting the $regexFindAll expression. Authenticated users running aggregation pipelines can crash mongod under specific conditions. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

CVE-2026-82052 Overview

CVE-2026-82052 is a denial-of-service vulnerability in MongoDB's mongod server process. An authenticated user with permission to run aggregation pipeline stages can trigger a server crash by invoking the $regexFindAll expression under specific input conditions. The crash occurs when a regex match begins in the middle of a multi-code-unit character, which triggers an internal assertion during query execution. The issue is classified as [CWE-617] Reachable Assertion. Successful exploitation halts the affected mongod process, disrupting database availability for all connected applications.

Critical Impact

An authenticated attacker with aggregation privileges can crash a MongoDB server through a single crafted $regexFindAll query, producing service-wide downtime.

Affected Products

  • MongoDB Server (mongod)
  • Deployments exposing aggregation pipeline execution to authenticated users
  • See MongoDB Jira Issue SERVER-127985 for version-specific fix details

Discovery Timeline

  • 2026-09-08 - CVE-2026-82052 published to the National Vulnerability Database (NVD)
  • 2026-09-10 - Last updated in NVD database

Technical Details for CVE-2026-82052

Vulnerability Analysis

The vulnerability resides in MongoDB's implementation of the $regexFindAll aggregation expression. This operator scans a string for all matches of a supplied regular expression and returns match metadata. When processing text containing multi-code-unit characters, such as UTF-8 encoded characters that span multiple bytes, the regex engine can begin matching partway through a character sequence. This misaligned start position violates an internal invariant and triggers a reachable assertion, terminating the mongod process.

Because the crash is deterministic once the input condition is met, a single query can take a database node offline. In replica set or sharded deployments, repeated exploitation can cascade across nodes as clients reconnect.

Root Cause

The root cause is a reachable assertion [CWE-617] in the $regexFindAll execution path. The code assumes regex match positions align to character boundaries, but under certain conditions a match may start in the middle of a multi-code-unit character. When this assumption fails, the assertion fires and the process aborts instead of returning an error to the client.

Attack Vector

Exploitation requires network access to the MongoDB server and authenticated credentials with permission to run aggregation pipelines. No user interaction is required. The attacker submits an aggregation pipeline that invokes $regexFindAll with a pattern and input text crafted to force a match starting inside a multi-code-unit character. Attack complexity is low and the impact is limited to availability. Confidentiality and integrity are not affected.

Technical details are tracked in MongoDB Jira Issue SERVER-127985. No public proof-of-concept exploit is available at the time of publication.

Detection Methods for CVE-2026-82052

Indicators of Compromise

  • Unexpected mongod process termination accompanied by assertion messages referencing regex or Unicode handling in server logs
  • Aggregation pipeline log entries containing $regexFindAll submitted by low-privileged authenticated users immediately prior to a crash
  • Repeated client reconnection storms following abrupt primary step-downs in replica sets

Detection Strategies

  • Enable MongoDB profiling and slow-query logging to capture aggregation pipelines that use $regexFindAll, then baseline expected usage per application service account
  • Correlate mongod crash events with the last executed query in the operation log to identify attacker-controlled input
  • Alert on any assertion or fatal-level entries in mongod.log that coincide with database restarts

Monitoring Recommendations

  • Forward MongoDB audit and diagnostic logs to a centralized analytics platform for real-time review
  • Track process uptime and unexpected restart counts per node as an availability signal
  • Monitor authentication events for aggregation-capable roles and flag rare or first-seen users issuing $regexFindAll queries

How to Mitigate CVE-2026-82052

Immediate Actions Required

  • Upgrade mongod to the fixed release identified in MongoDB Jira Issue SERVER-127985 as soon as it is available for your branch
  • Review role assignments and revoke aggregation privileges from accounts that do not require them
  • Rotate credentials for any service account whose aggregation access is broader than necessary

Patch Information

MongoDB tracks the fix under internal ticket SERVER-127985. Administrators should consult the linked Jira issue and the corresponding MongoDB security advisory for the exact patched versions across the 6.x, 7.x, and 8.x release branches. Apply the patch through a rolling restart to preserve replica set availability.

Workarounds

  • Restrict aggregation pipeline execution to trusted application accounts using MongoDB role-based access control until the patch is deployed
  • Place application-layer input validation in front of user-supplied regex patterns to reject non-UTF-8 or malformed byte sequences
  • Isolate MongoDB endpoints behind network segmentation so only authorized application tiers can submit queries
bash
# Example: revoke broad aggregation privileges from a role in the mongo shell
use admin
db.revokeRolesFromUser(
  "reporting_user",
  [ { role: "readWriteAnyDatabase", db: "admin" } ]
)
db.grantRolesToUser(
  "reporting_user",
  [ { role: "read", db: "reporting" } ]
)

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.