CVE-2026-6691

Description

A flaw was found in the MongoDB C Driver's Cyrus SASL integration. This vulnerability, a heap buffer overflow, occurs due to unsafe string copying during username canonicalization. A remote attacker can exploit this by providing untrusted input in the username of a MongoDB URI with authMechanism=GSSAPI, potentially leading to arbitrary code execution or denial of service before any authentication or network traffic.

Statement

Red Hat Product Security has determined that this vulnerability does not affect any currently supported Red Hat product. This assessment may evolve based on further analysis and discovery. For more information about this vulnerability and the products it affects, please see the linked references.

Mitigation

To mitigate this issue, avoid configuring the MongoDB C Driver to use authMechanism=GSSAPI in MongoDB URI connections. If GSSAPI authentication is required, restrict network access to the MongoDB service to trusted clients only, for example, by configuring firewall rules. This may impact the ability of untrusted clients to connect to the MongoDB service.

Understanding the Weakness (CWE)

Integrity,Confidentiality,Availability

Technical Impact: Modify Memory; Execute Unauthorized Code or Commands

Buffer overflows often can be used to execute arbitrary code, which is usually outside the scope of the product's implicit security policy. This can often be used to subvert any other security service.

Availability

Technical Impact: Modify Memory; DoS: Crash, Exit, or Restart; DoS: Resource Consumption (CPU)

Buffer overflows generally lead to crashes. Other attacks leading to lack of availability are possible, including putting the product into an infinite loop.

Frequently Asked Questions

Want to get errata notifications? Sign up here.