---
id: "CVE-2026-120684"
kind: "vulnerability"
aliases: ["CVE-2026-120684"]
title: "MongoDB C Driver: uninitialized memory can leak into GridFS stored files"
severity: "medium"
cvss: 6.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["c-driver", "gridfs", "libmongoc", "mongodb", "package"]
not_affected_if: ["no-c-driver", "no-gridfs"]
published_at: "2026-11-03T19:18:00+00:00"
first_seen_at: "2026-11-03T19:44:52+00:00"
updated_at: "2026-11-03T19:45:39+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120684", "first_seen_at": "2026-11-03T19:44:52+00:00"}]
---

# MongoDB C Driver: uninitialized memory can leak into GridFS stored files

The legacy GridFS file code in the MongoDB C Driver can store uninitialized process memory as file content. A database user with ordinary write access to shared storage may later read that memory, which can expose sensitive data from the application's process, including credentials.

_Summary, check and fix written by a model from the sources; labelled as such._

## Timeline

- 2026-11-03T19:44:52+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120684

## From the sources

A memory-initialization flaw in the legacy GridFS file handling of the MongoDB C Driver can cause uninitialized process memory to be treated as valid file content and stored on the server. A database user holding ordinary write access to a shared storage area can arrange conditions under which an application later appends to such a file and writes that memory into records the same user is permitted to read, which may result in unintended disclosure of sensitive information from the application's process, including credentials.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
