Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit oversized value via app input
-
DeliveryApplication encodes single BSON document via native extension
-
ExploitSigned 32-bit size arithmetic overflows
-
ExecutionUndefined-behavior guard fails to catch overflow
-
PersistOut-of-bounds write in process heap
-
ImpactMemory corruption or crash
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an application that uses PyMongo's bundled native C extension (the pure-Python BSON fallback is not affected) built such that document-size arithmetic overflows a signed 32-bit type. An attacker with no privileges must be able to place a single unusually large value (~2 GB, enough to overflow int32 size arithmetic) into data that the application then encodes into one BSON document. Affected versions are PyMongo before 4.18.2. Limiting factors: the build-dependent nature (many 64-bit builds may not be vulnerable), the very large data volume needed to trigger the overflow, and the fact that impact is confined to the hosting application's own process. |
| Impact | This is a genuine memory-corruption flaw (CWE-190 integer overflow leading to an out-of-bounds write) in the C extension of the ubiquitous MongoDB Python driver, but its real-world risk is moderated by several hard preconditions. The vendor CVSS 4.0 vector (AV:L/AC:L/AT:P) explicitly marks an Attack Requirement (AT:P) - 'depending on how the native extension was built' - meaning only certain builds where signed 32-bit size arithmetic can overflow are affected; a mismatch worth noting is that the vendor chose AV:L (local) even though the triggering 'very large value' can plausibly arrive over the network through the hosting application, so the true attack surface depends on the app. Triggering the overflow requires placing an unusually large value (on the order of ~2 GB) into a single BSON document, which is a substantial practical hurdle and pushes real complexity up (AC:H in 3.1 terms). No EPSS score, no CISA KEV listing, and no public exploit are present in the input, so exploitation status is 'no public exploit identified at time of analysis.' Net assessment: a real, patch-worthy driver-level memory-safety bug for anyone on affected 32-bit/int32 builds encoding attacker-influenced data, but not a drop-everything item - no evidence of active exploitation and non-trivial preconditions make it lower-urgency than its 7.5 base score suggests for most 64-bit deployments. |
| Exploit ScenarioDerived | An unauthenticated user submits an unusually large value (~2 GB) through an application feature that stores or serializes that data to MongoDB via PyMongo's native BSON encoder. When the driver encodes the single oversized document, the signed 32-bit size arithmetic overflows and the malformed (C-undefined) overflow guard fails to catch it, producing an out-of-bounds write inside the application's own process that corrupts memory or crashes it. No public exploit was identified, and success depends on how the native extension was built. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 24, 2026
An integer overflow in the BSON encoder of the MongoDB Python Driver's bundled native C extension (PyMongo before 4.18.2) can cause an out-of-bounds write inside the process hosting the driver when an application encodes a single document built from an unusually large (~2 GB) caller-supplied value. Only builds that link the C extension are affected - the pure-Python BSON fallback is not - and successfully triggering it requires that a large attacker-influenced value actually reach the encoding path, so most applications are exposed only through data they already accept from untrusted sources. The flaw is not confirmed as actively exploited (CISA KEV) and no public exploit code has been identified at time of analysis; the vendor has released 4.18.2 as the fixed version, and because impact is confined to the hosting application's own process, risk is best treated as a genuine but precondition-heavy memory-corruption issue.
RemediationAI
Upgrade the MongoDB Python Driver to version 4.18.2 or later - the vendor-released patch for this issue - and update lock files, container images, and vendored copies accordingly, since PyMongo is frequently pulled in transitively by libraries such as MongoEngine, Motor, and Beanie; confirm the upgrade actually takes effect with python -c "import pymongo; print(pymongo.version)". Where an immediate upgrade is not possible, the highest-value compensating control is to stop untrusted data from ever reaching a single BSON document at anywhere near the multi-gigabyte scale: validate and cap the byte length of every caller-supplied string, bytes, array, or nested object before it is passed to an encoder, and reject payloads whose aggregate size approaches your application's normal document ceiling (the overflow needs roughly 2 GB of input, so realistic input limits remove the trigger even though they do not repair the bug). A second option, if the driver build supports it, is to run with the pure-Python BSON implementation instead of the C extension, which sidesteps the vulnerable arithmetic entirely at a measurable encoding/decoding performance cost - acceptable for lower-throughput services, less so for encode-heavy ones. Note that the CVE's CVSS 4.0 vector is scored AV:L, indicating the vendor and assessment treat exploitation as requiring the ability to influence in-process data rather than a direct network attack primitive, so perimeter blocking is not a meaningful mitigation here; remediation must focus on the driver version and on bounding the size of data your application encodes into BSON.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in pypi, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability is a classic CWE-190 integer overflow in size arithmetic performed in a signed 32-bit type. PyMongo ships an optional native C extension that accelerates BSON document encoding/decoding; when building a document from caller-supplied data, that encoder accumulates the total document size in an int32. Once the accumulated size exceeds the signed 32-bit range (~2 GB of input to a single document), the arithmetic wraps, and the guard intended to detect the overflow is written in a form whose result is undefined behavior under the C standard - so the check cannot be relied upon to fire. The wrapped (negative or truncated) size is then used for buffer allocation/bounds decisions, allowing a write past the end of an allocated buffer within the application's own process. CPE cpe:2.3:a:mongodb:python_driver:*:*:*:*:*:*:*:* reflects the affected component, and the tagged references point at the 4.18.2 release and its changelog. Whether a given installation is triggerable depends on how the extension was compiled (notably pointer/size widths and optimization behavior), which is why the flaw is described by the vendor as build-dependent; the pure-Python BSON implementation performs size handling differently and is explicitly not affected.
Know when MongoDB gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
AC:H because exploitation needs ~2 GB single-value data plus a specific vulnerable build; PR:N/UI:N as no privileges or interaction are required; OOB write yields memory corruption (I:H/A:H) with limited confidentiality (C:L); note vendor chose AV:L.
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from Vendor (mongodb).
CVSS VectorVendor: mongodb
Lifecycle Timeline
2DescriptionCVE.org
An integer overflow in the BSON document encoding component of the MongoDB Python Driver's bundled native extension may occur when a single document is built from an unusually large amount of caller-supplied data. Size arithmetic is performed in a signed 32-bit type, and the guard meant to catch the overflow is written in a form whose behavior is not defined by the C language standard. A party with no privileges who can place a very large value into data that an application encodes may, depending on how the native extension was built, cause a write outside the bounds of an allocated buffer inside the application's own process.
Blast Radius
ecosystem impact- 248 pypi packages depend on pymongo (6 direct, 242 indirect)
Ecosystem-wide dependent count for version 4.18.2.
Articles & Coverage 2
Technical POC Analysis
CWE-190 (Integer Overflow or Wraparound), per the advisory.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
Applications running PyMongo's bundled C-accelerated BSON encoder (versions before 4.18.2) can suffer memory corruption inside their own process when they encode an exceptionally large (~2 GB) caller-supplied document, so exposure is concentrated in services that already accept large or attacker-influenced payloads from external sources. The vendor has shipped a fixed release, making this a routine dependency upgrade rather than a long-term mitigation problem. Leadership should care because this is a memory-corruption class defect reachable through untrusted input, though exploitation requires specific preconditions and no public exploit code has been identified at time of analysis.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.
MongoDB before 2.0.9 and 2.2.x before 2.2.4 does not properly validate requests to the nativeHelper function in SpiderMo
Use-after-free in MongoDB Server's replication component can terminate replica set members unexpectedly and, under certa
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
Authenticated command injection in Dokploy before 0.31.1 lets any user who can update a MySQL, PostgreSQL, MariaDB, Mong
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
Same weakness CWE-190 – Integer Overflow or Wraparound
View allSame technique Buffer Overflow
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Fixed |
| openSUSE Leap 16.0 | Fixed |
| openSUSE Tumbleweed | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP4 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Affected |
| openSUSE Leap 15.3 | Affected |
| openSUSE Leap 15.4 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-86348
GHSA-v4x9-3549-crwv
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB