CVE-2026-4148 Details
Description
A use-after-free vulnerability can be triggered in sharded clusters by an authenticated user with the read role who issues a specially crafted $lookup or $graphLookup aggregation pipeline.
A use-after-free vulnerability has been identified in MongoDB's aggregation pipeline processing, specifically within sharded clusters. This vulnerability can be exploited by an authenticated user with the read role who issues a specially crafted $lookup or $graphLookup aggregation pipeline. The root cause lies in the ExpressionContext management, where a raw pointer is stored instead of a smart pointer, leading to dangling references when the original context is freed. This issue arises during the cloning of pipelines for sharded dispatching, particularly with nested $unionWith operations that exacerbate the context reference problem.
Users can upgrade to MongoDB versions 8.3, 8.0.20, 7.0.31, or 8.2.6, where this vulnerability has been addressed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 17, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://jira.mongodb.org/browse/SERVER-119319 | [email protected] | PatchVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-416 | Use After Free | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| mongodb mongodb | >= 7.0.0, < 7.0.31 >= 8.0.0, < 8.0.20 >= 8.2.0, < 8.2.6 8.3.0 alpha0 8.3.0 alpha1 8.3.0 alpha2 8.3.0 alpha3 8.3.0 rc1 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 10, 2026 | Initial Analysis | [email protected] |
| Mar 17, 2026 | New CVE Received | [email protected] |