ZeroHour

CVE-2026-81521

large

Namespace injection in MongoDB Go Driver BulkWrite misdirects database writes

CVSS 4.0
7.1 high
EPSS
<1%p10
Published
()
Modified
AI analysis

The MongoDB Go Driver fails to escape reserved separator characters in a caller-supplied database name before using it to build the target namespace for a client-level bulk write, a resource identifier control flaw (CWE-99). It is triggered when a Go application passes untrusted input, such as a user-controlled string, as the database name to the Client.BulkWrite API. An attacker who controls that input can redirect the write operations to a database and collection other than the one the application intended, injecting or corrupting data with the application's privileges; per the CVSS vector, the impact is integrity-only (high integrity impact, no confidentiality impact), so the attacker cannot read other namespaces. Only Go applications that use the Client.BulkWrite API with attacker-influenced database names are affected; uses with hardcoded, trusted database names are not meaningfully exposed. There is no known exploitation, no public proof of concept, and the flaw is not in CISA KEV, with EPSS estimating only a 0.2% probability of exploitation within 30 days.

What to do: Audit Go codebases for calls to Client.BulkWrite and determine whether the database name derives from user or external input; if so, validate or escape it (e.g., restrict to a safe character set) or use a trusted internal mapping from input to database names. Upgrade to the latest patched driver release published by MongoDB once available (the fixed version is not specified in the source data). No exploitation has been observed, so this can be handled in a normal patch cycle unless your application fits the vulnerable usage pattern.

Affected
MongoDB Go Driver (mongo-go-driver), Client.BulkWrite API
Estimated exposure
largePlausibly on the order of 100,000+ Go applications and services built on the driver, though practical exposure is limited to those passing untrusted database… — This is MongoDB's official Go client with very broad adoption across Go backend services (millions of module downloads), but the exploitable condition requires the narrower pattern of untrusted input used as a database name in…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

The MongoDB Go Driver's client-level bulk write operation may accept a caller-supplied database name containing a reserved separator character without escaping it before the name is used to build the target namespace for the operation. An application that passes untrusted input as a database name could therefore have the write directed at a database and collection other than the ones it intended. Only the Client.BulkWrite API is affected.

Weakness
CWE-99
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

No ingested article mentions this CVE yet.