CVE Database›Document archive›CVE-2026-88029

CVE-2026-88029

pymongo: MongoDB Python Driver: Data disclosure and denial of service via query-operator injection

Loading…

Severity

Important

Red Hat Product Security

8.3

CVSS 3.1

Review impact separately from score.

Published · September 11, 2026

Updated · October 22, 2026

Description

A flaw was found in the GridFS component of the MongoDB Python Driver (pymongo). The driver can treat a caller-supplied structured file identifier as a MongoDB query condition instead of a literal identifier. An authenticated user who can influence the identifier passed to GridFS download, delete, or rename operations may retrieve stored file content beyond the intended target, delete all GridFS chunks in the affected bucket (rendering stored files unreadable), or rename a file other than the intended target.

Statement

This vulnerability is rated as Important because an authenticated user who can influence a GridFS file identifier can delete all file chunks in the affected bucket, making stored files unreadable, and can retrieve or rename a file other than the intended target. Exploitation requires an application to pass a structured identifier, for example a dictionary containing MongoDB query operators, into GridFS download, delete, or rename APIs rather than a literal identifier such as an ObjectId or string.

pymongo is a client library. A deployment is exploitable only if it calls those GridFS APIs with attacker-influenced identifiers. Scalar identifiers are not interpreted as query conditions. Successful exploitation is limited to GridFS-stored file content. It does not by itself provide code execution or host compromise.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

There is no complete mitigation for applications that must accept untrusted structured GridFS file identifiers. The following measures reduce risk until a patched pymongo is available:

  1. Pass only literal identifiers to GridFS download, delete, and rename operations (ObjectId, string, or integer). Do not pass dictionaries, BSON documents, or other structured values derived from user input.
  2. Restrict which authenticated users can invoke GridFS operations, and do not expose GridFS APIs to untrusted clients.
  3. If GridFS is not required, avoid using the gridfs module.

CVSS / CWE

CVSS 3.1 · 8.3
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H

CWE-943 · Improper Neutralization of Special Elements in Data Query Logic