2026-05-06 15:8CVE-2026-6691mongodb
PUBLISHED5.2CWE-120

MongoDB C Driver Cyrus SASL Canonicalization Buffer Overflow

The MongoDB C Driver's Cyrus SASL integration performs unsafe string copying during username canonicalization, enabling a heap buffer overflow before any authentication or network traffic. This may be triggered by passing untrusted input in the username of a MongoDB URI with authMechanism=GSSAPI.

Problem type

Affected products

MongoDB Inc.

MongoDB C Driver

<= 2.1.2 - AFFECTED

References

GitHub Security Advisories

GHSA-587q-94wg-2pfp

The MongoDB C Driver's Cyrus SASL integration performs unsafe string copying during username...

https://github.com/advisories/GHSA-587q-94wg-2pfp

The MongoDB C Driver's Cyrus SASL integration performs unsafe string copying during username canonicalization, enabling a heap buffer overflow before any authentication or network traffic. This may be triggered by passing untrusted input in the username of a MongoDB URI with authMechanism=GSSAPI.

JSON source

https://cveawg.mitre.org/api/cve/CVE-2026-6691
Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2026-6691",
    "assignerOrgId": "a39b4221-9bd0-4244-95fc-f3e2e07f1deb",
    "assignerShortName": "mongodb",
    "dateUpdated": "2026-05-07T03:55:47.410Z",
    "dateReserved": "2026-04-20T16:17:41.724Z",
    "datePublished": "2026-05-06T15:08:23.671Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "a39b4221-9bd0-4244-95fc-f3e2e07f1deb",
        "shortName": "mongodb",
        "dateUpdated": "2026-05-06T15:08:23.671Z"
      },
      "title": "MongoDB C Driver Cyrus SASL Canonicalization Buffer Overflow",
      "descriptions": [
        {
          "lang": "en",
          "value": "The MongoDB C Driver's Cyrus SASL integration performs unsafe string copying during username canonicalization, enabling a heap buffer overflow before any authentication or network traffic. This may be triggered by passing untrusted input in the username of a MongoDB URI with authMechanism=GSSAPI.",
          "supportingMedia": [
            {
              "type": "text/html",
              "base64": false,
              "value": "The MongoDB C Driver's Cyrus SASL integration performs unsafe string copying during username canonicalization, enabling a heap buffer overflow before any authentication or network traffic. This may be triggered by passing untrusted input in the username of a MongoDB URI with authMechanism=GSSAPI."
            }
          ]
        }
      ],
      "affected": [
        {
          "vendor": "MongoDB Inc.",
          "product": "MongoDB C Driver",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "2.1.0",
              "status": "affected",
              "versionType": "semver",
              "lessThanOrEqual": "2.1.2"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-120 Buffer Copy without Checking Size of Input",
              "cweId": "CWE-120",
              "type": "CWE"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://jira.mongodb.org/browse/CDRIVER-6134"
        }
      ],
      "impacts": [
        {
          "capecId": "CAPEC-100",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-100 Overflow Buffers"
            }
          ]
        }
      ],
      "metrics": [
        {
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        },
        {
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ],
          "cvssV3_1": {
            "version": "3.1",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
            "attackVector": "LOCAL",
            "attackComplexity": "LOW",
            "privilegesRequired": "NONE",
            "userInteraction": "REQUIRED",
            "scope": "UNCHANGED",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "availabilityImpact": "HIGH",
            "baseScore": 7.8,
            "baseSeverity": "HIGH"
          }
        }
      ]
    },
    "adp": [
      {
        "providerMetadata": {
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP",
          "dateUpdated": "2026-05-07T03:55:47.410Z"
        },
        "title": "CISA ADP Vulnrichment",
        "metrics": [
          {}
        ]
      }
    ]
  }
}