Junglewise Threat Intelligence

CVE-2026-81521: MongoDB Go Driver namespace injection in BulkWrite

CVE-2026-81521 · Severity: medium · CVSS 6.5 · Published 2026-08-27

Technologies: MongoDB Go Driver. Vendors: MongoDB.

Executive brief

The MongoDB Go Driver's client-level bulk write operation fails to escape reserved characters (specifically "." and NUL bytes) in user-supplied database names before building the database/collection namespace. An application that accepts untrusted database names could have write operations silently redirected to unintended databases and collections, potentially causing data to be written to the wrong location or enabling unauthorized data modification.

Technical details

The vulnerability is a namespace injection issue in the Client.BulkWrite API. When a caller supplies a database name containing reserved separator characters ("." or NUL bytes), the driver does not validate or escape these characters before constructing the target namespace. This allows an attacker-controlled database name to be reinterpreted, potentially directing writes to a different database and collection than intended. The attack vector is local/application-level—an attacker must control the database name parameter passed to the BulkWrite call. The fix (released in v2.8.2) validates database and collection names, rejecting any that contain "." or NUL bytes and returning an error to the caller, preventing silent misdirection of writes.

Affected products

  • MongoDB Go Driver before 2.8.2

Timeline

  • 2026-08-27: disclosed
  • 2026-08-27: patched: Fix released in v2.8.2

References

Related threats