CVE-2026-96297: MongoDB Server use-after-free in aggregation pipeline

CVE-2026-96297 · Severity: medium · CVSS 6.5 · Published 2026-10-13

MongoDB Server, a widely-used NoSQL database, contains a memory management flaw in its aggregation feature that can be triggered by authenticated database users. When specific aggregation settings are combined, the server may read sensitive data from freed memory or crash unexpectedly, potentially exposing unrelated information from the database process to attackers who have read access.

Technologies: MongoDB Server. Vendors: MongoDB.

Quick answers

Is CVE-2026-96297 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-96297 being exploited in the wild.
How severe is CVE-2026-96297?
Medium severity, with a CVSS score of 6.5, published 13 October 2026.
Which products and versions are affected?
MongoDB Server before 7.0.45, 8.0.34, 8.3.13, 9.0.4, 9.1.0-rc0.
Is there a fix for CVE-2026-96297?
Yes: fixed in MongoDB Server 7.0.45, 8.0.34, 8.3.13, 9.0.4, 9.1.0-rc0 and later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-96297 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-96297?
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: MongoDB Server 7.0.45, 8.0.34, 8.3.13, 9.0.4, 9.1.0-rc0 and later

Technical details

A use-after-free vulnerability exists in the $_internalApplyOplogUpdate aggregation stage when batch size 0 is combined with certain pipeline configurations. The stage holds an unowned reference to oplog update BSON that is freed after the initial aggregate command completes; a subsequent getMore request dereferences this freed memory, causing either information disclosure or a crash. The vulnerability requires authenticated database access with read privileges and occurs during normal query execution.

Affected products

  • MongoDB Server before 7.0.45, 8.0.34, 8.3.13, 9.0.4, 9.1.0-rc0

Timeline

  • 2026-10-13: disclosed

References

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