CVE-2026-120821: MongoDB Server use-after-free in aggregation framework

CVE-2026-120821 · Severity: medium · CVSS 6.5 · Published 2026-11-10

MongoDB Server is a widely-used database that processes data queries through an aggregation framework. A use-after-free vulnerability in this framework can cause the database server to crash unexpectedly when certain expressions are evaluated, leading to service disruption. The issue only affects authenticated users with read access to the database.

Technologies: MongoDB Server. Vendors: MongoDB.

Quick answers

Is CVE-2026-120821 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-120821 being exploited in the wild.
How severe is CVE-2026-120821?
Medium severity, with a CVSS score of 6.5, published 10 November 2026.
Which products and versions are affected?
MongoDB Server before 9.0.7.
Is there a fix for CVE-2026-120821?
Yes: fixed in 9.0.7. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-120821 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-120821?
Check whether you run MongoDB Server at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: 9.0.7

Technical details

A use-after-free vulnerability exists in MongoDB's aggregation framework, specifically in ExpressionSortArray and related expression classes (ExpressionTopN, ExpressionTop, ExpressionBotton, ExpressionBottomN). These classes incorrectly clone the PatternValueCmp member by copying a pointer to a Collator object from the original ExpressionContext; when the original context is destroyed, the pointer becomes dangling. An authenticated user with read privileges can trigger the vulnerability by evaluating certain expressions in an aggregation sub-pipeline, causing a denial of service.

Affected products

  • MongoDB Server before 9.0.7

Timeline

  • 2026-11-10: disclosed
  • 2026-11-10: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.