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

Source: https://junglewise.ai/threats/cve-2026-96297-use-of-freed-memory-in-the-aggregation-feature-of-mongodb-server  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-13. Updated: 2026-10-16  
License: CC BY 4.0 with a link back

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](https://junglewise.ai/threats/technologies/mongodb-server). Vendors: [MongoDB](https://junglewise.ai/threats/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

- [https://jira.mongodb.org/browse/SERVER-132946](https://jira.mongodb.org/browse/SERVER-132946)

## Related threats

- [MongoDB Server authorization bypass in aggregation pipeline](https://junglewise.ai/threats/cve-2026-120825-an-authorization-weakness-in-the-aggregation-framework-of)
- [MongoDB Server use-after-free in time-series bucket validation](https://junglewise.ai/threats/cve-2026-120824-a-use-after-free-in-the-time-series-collection-component-of)
- [MongoDB Server missing authorization check in aggregation framework](https://junglewise.ai/threats/cve-2026-120823-a-missing-authorization-check-in-the-aggregation-framework-of)
- [MongoDB Server authorization bypass in applyOps](https://junglewise.ai/threats/cve-2026-120822-mongodb-server-may-omit-an-authorization-check-on-the-resource)
- [MongoDB Server use-after-free in aggregation framework](https://junglewise.ai/threats/cve-2026-120821-a-use-after-free-in-the-aggregation-framework-of-mongodb-server)
