Skip to content
Heist/ feed
Back to feed
High

Cross-database write retargeting via unvalidated dotted database name in Client.BulkWrite in the MongoDB Go Driver

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-81521
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 18:59 UTC · Revision 1

Source evidence

Cross-database write retargeting via unvalidated dotted database name in Client.BulkWrite in the MongoDB Go Driver

core-osv · Original source

Published 27 Aug 2026, 18:31 UTC

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.

osv:CVE-2026-81521
Complete source record
{
  "id": "7d1a2a26a47d36bd547130c16ebaff50ede665e9dee2db129707422890342d8b",
  "url": "https://osv.dev/vulnerability/CVE-2026-81521",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Cross-database write retargeting via unvalidated dotted database name in Client.BulkWrite in the MongoDB Go Driver",
    "summary": "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.",
    "evidence": "osv:CVE-2026-81521",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-81521",
      "aliases": [
        "CVE-2026-81521"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/mongodb/mongo-go-driver",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5afecc5d27e39384dd89ccacde921025cb74d7f1"
                },
                {
                  "fixed": "1af6d00dbeb70805a69cc9f8fc0828e1f4cef1ee"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:mongodb:go_driver:*:*:*:*:*:mongodb:*:*",
                    "range": [
                      {
                        "introduced": "2.1.0"
                      },
                      {
                        "fixed": "2.8.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.8.1",
            "v2.8.0",
            "v2.6.0",
            "v2.5.0",
            "v2.4.0",
            "v2.3.0",
            "v2.2.0",
            "v2.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-81521.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:38.525428193Z",
      "provider": "osv",
      "references": [
        "https://jira.mongodb.org/browse/GODRIVER-4075",
        "https://pkg.go.dev/go.mongodb.org/mongo-driver/v2@v2.8.2",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/81xxx/CVE-2026-81521.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-81521"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-99"
        ],
        "cna_assigner": "mongodb",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "2.1.0"
                  },
                  {
                    "fixed": "2.8.2"
                  },
                  {
                    "introduced": "2.9.0"
                  },
                  {
                    "fixed": "2.9.2"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/81xxx/CVE-2026-81521.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-81521",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 505933,
  "published_at": "2026-08-27T18:31:45.45+00:00"
}