Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Authenticated network user running aggregation pipelines (PR:L, AV:N, AC:L); bounded heap disclosure (C:L), no integrity impact, reliable crash gives A:H.
Primary rating from Vendor (mongodb).
CVSS VectorVendor: mongodb
Lifecycle Timeline
3DescriptionCVE.org
A missing bounds check in the BSON CodeWScope element accessors allows an attacker to trigger an out-of-bounds heap read via a crafted aggregation pipeline. The vulnerability can be exploited by an authenticated user by generating a malformed BSONColumn data containing a CodeWScope element, bypassing wire-level BSON validation. When the forged element is decompressed, the unchecked size value is used in pointer arithmetic, causing either a server crash or disclosure of adjacent heap memory contents.
AnalysisAI
Out-of-bounds heap read in MongoDB Server's BSON CodeWScope element accessors lets an authenticated user disclose adjacent heap memory or crash the server (denial of service) by submitting a crafted aggregation pipeline. The exploit path abuses malformed BSONColumn (columnar/compressed BSON) data whose CodeWScope element bypasses the normal wire-level BSON validation, so an unchecked size field is trusted during decompression. There is no public exploit identified at time of analysis and it is not listed in CISA KEV; the CVSS 4.0 base score is 7.1, driven mainly by high availability impact.
Technical ContextAI
The flaw sits in MongoDB's BSON parsing layer, specifically the accessor functions for the BSON CodeWScope type (a JavaScript code string bundled with a variable scope document). Normally elements arriving over the wire are validated, but BSONColumn - the compressed columnar encoding used for time-series and columnar storage - is decompressed after that validation boundary. An attacker embeds a forged CodeWScope element inside BSONColumn data; when decompressed, its declared size value is used directly in pointer arithmetic without a bounds check. This is a classic CWE-125 (Out-of-bounds Read): the length prefix is attacker-controlled and trusted, so the reader walks past the end of the heap allocation, either faulting (crash) or returning neighbouring heap bytes to the caller. No specific fixed CPE range is provided in the source data, so the exact affected server versions must be confirmed against the MongoDB advisory.
RemediationAI
No vendor-released patch version is identified in the provided data, so the primary action is to consult MongoDB advisory/ticket SERVER-129103 (https://jira.mongodb.org/browse/SERVER-129103) for the fixed release and upgrade mongod to it once published. As compensating controls while a patch is pending: enforce least-privilege authorization so only trusted roles can run aggregation pipelines, and revoke or tighten any application/service accounts that do not require ad-hoc aggregation access (trade-off: may break applications that rely on rich pipeline queries); restrict network exposure of mongod to trusted application tiers only, so the authenticated attack surface is minimized; and monitor for repeated mongod crashes/restarts as an indicator of attempted exploitation. Because the vulnerability is reached through legitimate authenticated query paths, there is no clean feature toggle to disable BSONColumn decompression without affecting time-series/columnar workloads, so credential hygiene and privilege reduction are the most effective interim measures.
MongoDB before 2.0.9 and 2.2.x before 2.2.4 does not properly validate requests to the nativeHelper function in SpiderMo
The find prototype in scripting/engine_v8.h in MongoDB 2.4.0 through 2.4.4 allows remote authenticated users to cause a
The MongoDB bson JavaScript module (also known as js-bson) versions 0.5.0 to 1.0.x before 1.0.5 is vulnerable to a Regul
Remote code execution in Chartbrew versions prior to 4.8.1 allows authenticated attackers with high privileges to execut
After user deletion in MongoDB Server the improper invalidation of authorization sessions allows an authenticated user's
The default configuration for MongoDB before 2.3.2 does not validate objects, which allows remote authenticated users to
SimStudio below 0.5.74 has a missing authorization on MongoDB tool endpoints that allows attackers to execute arbitrary
MongoDB Server may access non-initialized region of memory leading to unexpected behaviour when zero arguments are calle
MongoDB Compass may be susceptible to code injection due to insufficient sandbox protection settings with the usage of e
Under certain configurations of --tlsCAFile and tls.CAFile, MongoDB Server may skip peer certificate validation which ma
All versions of bson before 1.1.4 are vulnerable to Deserialization of Untrusted Data. Rated critical severity (CVSS 9.8
Memory corruption in the MongoDB BI Connector ODBC Driver (fixed in v1.4.9) occurs when an oversized catalog, schema, or
Same weakness CWE-125 – Out-of-bounds Read
View allSame technique Buffer Overflow
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-47784