---
id: "CVE-2026-119672"
kind: "vulnerability"
aliases: ["CVE-2026-119672"]
title: "MongoDB Database Tools: mongofiles can leak GridFS files to stdout"
severity: "medium"
cvss: 5.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["database-tools", "gridfs", "mongodb", "mongofiles", "package"]
not_affected_if: ["always-uses-local-flag", "mongofiles-not-used", "version-100.20.1-or-later"]
published_at: "2026-11-03T17:18:06+00:00"
first_seen_at: "2026-11-03T17:21:56+00:00"
updated_at: "2026-11-03T17:24:21+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-119672", "first_seen_at": "2026-11-03T17:21:56+00:00"}]
---

# MongoDB Database Tools: mongofiles can leak GridFS files to stdout

mongofiles, a MongoDB Database Tools command, uses a filename stored in the database as the output path when retrieving a file without --local. A user who can edit GridFS file metadata can set the name to '-', so a later retrieval by a privileged operator writes the file contents to standard output, where a user with access to that output may read them.

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

## How to check

- Run `mongofiles --version` and compare against the affected range (3.1.4 up to, not including 100.20.1).
- Check whether any scripts or cron jobs run `mongofiles get` without `--local` and capture stdout to a shared or logged location.

## Fix

- Move MongoDB Database Tools to `100.20.1` or later.

## Timeline

- 2026-11-03T17:21:56+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-119672

## From the sources

MongoDB Database Tools mongofiles uses a database-stored GridFS filename as the output destination for get_id when --local is not specified. A user who can modify the file metadata can set the stored filename to '-', causing a later authorized retrieval to write the file contents to standard output instead of a local file. If standard output is captured in a location accessible to that user, this may disclose GridFS content the user cannot read directly. Exploitation requires a higher-privileged operator to retrieve the affected file without an explicit local destination and attacker access to the captured output. This issue affects MongoDB Database Tools from version 3.1.4 through versions before 100.20.1.

---

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