CVE-2026-81521
largeNamespace injection in MongoDB Go Driver BulkWrite misdirects database writes
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.
| MongoDB Go Driver (mongo-go-driver), Client.BulkWrite API | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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 news0 stories
No ingested article mentions this CVE yet.