Skip to main content

MongoDB C Driver CVE-2026-9100

| EUVDEUVD-2026-31132 MEDIUM
Improper Validation of Specified Index, Position, or Offset in Input (CWE-1285)
2026-05-20 mongodb GHSA-87jr-c2qj-3qrg
6.0
CVSS 4.0 · Vendor: mongodb
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain low-privilege MongoDB database credentials
  2. Delivery
    Write crafted fs.files document with chunkSize=0 or malformed length field
  3. Exploit
    Wait for or trigger victim application to read the malformed GridFS file via legacy C Driver API
  4. Execution
    Driver consumes unvalidated metadata
  5. Impact
    Trigger division-by-zero crash (DoS) or out-of-bounds read (memory disclosure)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Hardware permission validation
Exploitation Conditions

Exploitation requires all of the following specific conditions to be satisfied simultaneously. First, the target application must use the MongoDB C Driver's legacy GridFS API to read files - applications using alternative GridFS implementations or not using GridFS functionality are entirely unaffected. Second, the attacker must possess low-privilege authenticated database access sufficient to write documents to the GridFS fs.files collection (consistent with PR:L in the CVSS vector); this could be a direct database credential or an indirect path through a writable application endpoint that stores user-supplied data into GridFS. Third, AT:P (Attack Requirements: Present) in the CVSS 4.0 vector confirms that a pre-positioned malformed document must already exist in the collection at the time the vulnerable application reads it - the attacker cannot trigger the flaw in a single unauthenticated network request. Exploitation is limited by the authentication prerequisite (PR:L), the requirement to control or influence GridFS collection contents, and the scoping of the confidentiality impact to process memory (VC:L) rather than arbitrary storage or cross-scope data. Environments where GridFS collections are only writable by the application's own privileged service account and not accessible to external users or lower-trust tenants have substantially reduced exposure.

Impact

The CVSS 4.0 score of 6.0 (AV:N/AC:L/AT:P/PR:L/UI:N, VC:L/VI:N/VA:H) reflects a nuanced risk picture. Network reachability (AV:N) and low complexity (AC:L) broaden the potential attacker pool, but the attack requirement (AT:P) is a meaningful constraint: a malformed document must already be resident in the target GridFS collection before the vulnerable read path is triggered. Low-privilege authentication (PR:L) is additionally required, meaning unauthenticated exploitation is not supported by the CVSS vector. The dual impact profile is the most operationally significant signal: VA:H indicates a reliable crash vector (division-by-zero is deterministic), while VC:L reflects a bounded but real memory disclosure risk. No EPSS score was provided in the input data, so quantitative exploitation probability cannot be cited. This CVE is not listed in the CISA KEV catalog and no public proof-of-concept has been identified, consistent with a researcher-reported, vendor-confirmed vulnerability without observed in-the-wild abuse. In multi-tenant or shared MongoDB deployments - where one tenant can write to collections that a privileged application process subsequently reads - the AT:P precondition is substantially easier to satisfy, elevating practical risk above what the base score alone suggests.

Exploit ScenarioDerived

An attacker with low-privilege write access to a MongoDB instance - such as a compromised application service account or a malicious tenant in a shared deployment - inserts a crafted document into the fs.files collection with a chunkSize field set to zero and a malformed length value. When the legitimate application subsequently reads that file using the MongoDB C Driver's legacy GridFS API, the driver consumes the unvalidated metadata and either divides by the zero chunkSize (crashing the process and producing a denial of service) or performs an out-of-bounds memory read using the malformed length, returning heap memory contents that may include sensitive in-process data such as connection strings, session tokens, or other application secrets. No public proof-of-concept code has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 20, 2026

The legacy GridFS API in the MongoDB C Driver fails to validate file metadata fields retrieved from the database, enabling crafted documents stored in a GridFS collection to trigger either a division-by-zero crash (denial of service) or an out-of-bounds read that exposes process memory contents to the caller. Versions in the 1.x branch before 1.30.8 and 2.x branch before 2.2.4 are affected per EUVD-2026-31132. The CVSS 4.0 score of 6.0 accurately reflects a constrained attack path requiring low-privilege database access and a pre-positioned malicious document (AT:P), with no public exploit identified at time of analysis.

RemediationAI

The primary remediation is to upgrade the MongoDB C Driver to version 1.30.8 or later for 1.x branch deployments, or to version 2.2.4 or later for 2.x branch deployments; the vendor-released patch is confirmed available per the reporter (MongoDB) and tracked at https://jira.mongodb.org/browse/CDRIVER-6281. Where immediate upgrade is not feasible, restrict write access to the fs.files and fs.chunks GridFS collections to only fully trusted application service accounts using MongoDB role-based access control - this raises the bar for an attacker to pre-position malformed documents, though it does not eliminate risk if any trusted application path can introduce externally-supplied metadata. As an additional compensating control, if the application does not strictly require the legacy GridFS API, migrating to the non-legacy GridFS implementation removes the vulnerable code path entirely, though this requires application-level changes and regression testing. Applications that do not use GridFS at all should confirm they are not linking against the legacy API surface to eliminate exposure. Note that restricting collection-level write permissions has the trade-off of potentially breaking application workflows that rely on direct GridFS document insertion.

Affected VersionsENISA

C Driver 1.0 <1.30.8
C Driver 2.0 <2.2.4

Affected Packages

euvd c_driver fix: 1.30.8, 2.2.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The MongoDB C Driver (CPE: cpe:2.3:a:mongodb,_inc.:c_driver:*:*:*:*:*:*:*:*) is the official C-language client library used directly by applications and as an underlying component of higher-level MongoDB drivers. Its legacy GridFS API reads file metadata documents - including fields such as chunkSize and length - from the fs.files collection and uses them in arithmetic operations and memory offset calculations without adequate input validation. CWE-1285 (Improper Validation of Specified Index, Position, or Offset in Input) precisely describes the root cause: when the driver consumes a chunkSize value of zero, a downstream division operation produces a divide-by-zero fault, crashing the process. When a malformed length or offset field is accepted, the driver performs an out-of-bounds read, potentially returning arbitrary heap or stack memory contents to the application. The 'Buffer Overflow' tag attached to this CVE is a coarse automated classification; the actual mechanics are better characterised as improper offset validation leading to a read primitive rather than a classic write overflow.

Know when C Driver 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

Vendor (mongodb) PRIMARY 6.0 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 5.9 MEDIUM
AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:H

Primary rating from Vendor (mongodb).

CVSS VectorVendor: mongodb

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
May 20, 2026 - 17:22 NVD
5.9 (MEDIUM) 6.0 (MEDIUM)
Patch available
May 20, 2026 - 17:02 EUVD

DescriptionCVE.org

The MongoDB C Driver's legacy GridFS API accepts malformed file metadata from the database without adequate validation. Crafted documents in a GridFS collection may cause any application that reads those files via the legacy API to either crash (via a division-by-zero) or silently leak process memory contents (via an out-of-bounds read).

Threat Intelligence Overview

EPSS Score
0.1%
Top 80% exploitable
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

CVE-2020-12135 MEDIUM POC
5.5 Apr 24

bson before 0.8 incorrectly uses int rather than size_t for many variables, parameters, and return values. Rated medium

CVE-2026-93393 CRITICAL
9.2 Sep 17

Heap-based buffer overflow in the TLS transport layer of the MongoDB C Driver on Windows TLS-backend builds allows the e

CVE-2026-81522 HIGH
8.6 Aug 27

Namespace injection in the MongoDB C++ Driver (all versions prior to r4.5.1) allows low-privileged users of affected mul

CVE-2026-96746 HIGH
8.3 Sep 24

Heap out-of-bounds write in the MongoDB C Driver (libmongoc) allows an unauthenticated attacker who controls DNS resolut

CVE-2026-84964 HIGH
8.2 Sep 03

Double-free memory corruption in the MongoDB C Driver's OpenSSL-based TLS certificate revocation checking path allows a

CVE-2024-7553 HIGH
7.8 Aug 07

Incorrect validation of files loaded from a local untrusted directory may allow local privilege escalation if the underl

CVE-2026-81529 HIGH
7.1 Aug 27

Connection-option injection in the MongoDB C# Driver allows a low-privileged application user to introduce or suppress s

CVE-2026-93395 MEDIUM
6.9 Sep 17

Denial of service in applications using the MongoDB C Driver's libbson library can be triggered by crafted BSON input wi

CVE-2026-81527 MEDIUM
6.9 Aug 27

NoSQL injection in the MongoDB C# Driver's LINQ-to-aggregation translation layer allows network-accessible, unauthentica

CVE-2025-12119 MEDIUM
6.9 Nov 18

A mongoc_bulk_operation_t may read invalid memory if large options are passed. Rated medium severity (CVSS 6.9), this vu

CVE-2026-81530 MEDIUM
6.8 Aug 27

Sensitive KMS provider credentials supplied for client-side field-level encryption (CSFLE) in the MongoDB C# Driver are

CVE-2026-93394 MEDIUM
6.3 Sep 17

SCRAM authentication in the MongoDB C Driver (libmongoc) fails to abort when a nonce mismatch is detected in the server'

Vendor StatusVendor

SUSE

Severity: Medium

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy