CVE-2021-32050: MongoDB C++

High severity, CVSS 7.5. EPSS: 0.6% probability of exploitation activity in the next 30 days.

Some MongoDB Drivers may erroneously publish events containing authentication-related data to a command listener configured by an application. The published events may contain security-sensitive data when specific authentication-related commands are executed. Without due care, an application may inadvertently expose this sensitive information, e.g., by writing it to a log file. This issue only arises if an application enables the command listener feature (this is not enabled by default). This issue affects the MongoDB C Driver 1.0.0 prior to 1.17.7, MongoDB PHP Driver 1.0.0 prior to 1.9.2, MongoDB Swift Driver 1.0.0 prior to 1.1.1, MongoDB Node.js Driver 3.6 prior to 3.6.10, MongoDB Node.js Driver 4.0 prior to 4.17.0 and MongoDB Node.js Driver 5.0 prior to 5.8.0. This issue also affects users of the MongoDB C++ Driver dependent on the C driver 1.0.0 prior to 1.17.7 (C++ driver prior to 3.7.0).

What to do

The record states a fixed version for each range of affected versions. Update to the one for the range your version is in: a later release on another branch may not have the fix.

  • MongoDB C++, from 1.0.0, before 1.17.7: fixed in 1.17.7
  • MongoDB C Driver, from 1.0.0, before 1.17.7: fixed in 1.17.7
  • MongoDB Node.js, from 3.6, before 3.6.10: fixed in 3.6.10
  • MongoDB Node.js, from 4.0, before 4.17.0: fixed in 4.17.0
  • MongoDB Node.js, from 5.0, before 5.8.0: fixed in 5.8.0
  • MongoDB PHP Driver, from 1.0.0, before 1.9.2: fixed in 1.9.2
  • MongoDB Swift Driver, from 1.0.0, before 1.1.1: fixed in 1.1.1

Affected products

  • MongoDB C++: from 1.0.0, before 1.17.7 (fixed in 1.17.7)
  • MongoDB C Driver: from 1.0.0, before 1.17.7 (fixed in 1.17.7)
  • MongoDB Node.js: from 3.6, before 3.6.10 (fixed in 3.6.10); from 4.0, before 4.17.0 (fixed in 4.17.0); from 5.0, before 5.8.0 (fixed in 5.8.0)
  • MongoDB PHP Driver: from 1.0.0, before 1.9.2 (fixed in 1.9.2)
  • MongoDB Swift Driver: from 1.0.0, before 1.1.1 (fixed in 1.1.1)

Affected packages

Published 2023-08-29. Last modified 2026-06-17.