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

- Severity: Medium 4.2 (CVSS:3.1, scored by mongodb) `CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.31%, higher than 25% of CVEs (2026-12-01)
- Published: 2021-08-02T12:50:09.915Z
- Modified: 2026-06-17T03:33:41.470Z
- Also known as: GHSA-4rjr-3gj2-5crq
- Weaknesses: CWE-200
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: mongodb

## 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

(As written by CVE List.)

## Affected

- MongoDB Inc. MongoDB Rust Driver: 2.0.0-alpha; 2.0.0-alpha1; from 1.0.0 up to 1.2.1
- mongodb rust_driver: 2.0.0-alpha; 2.0.0-alpha1; from 1.00.0 up to 1.2.1; from 1.0.0 up to 1.2.1; 2.0.0
- mongodb (crates.io): from 1.0.0 before 2.0.0-beta

## Every score

- mongodb: CVSS:3.1 4.2 Medium `CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 4.4 Medium `CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 4.4 Medium `CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:2.0 2.1 Low `AV:L/AC:L/Au:N/C:P/I:N/A:N`

## References

- <https://jira.mongodb.org/browse/RUST-591> (patch, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-20332> (advisory)
- <https://github.com/mongodb/mongo-rust-driver/commit/9e8782b1bb1104e5399c073b553719c262d4463c> (web)
- <https://github.com/mongodb/mongo-rust-driver> (package)

## Sources

- CVE List: [CVE-2021-20332](https://www.cve.org/CVERecord?id=CVE-2021-20332), CVE Terms of Use, modified 2024-09-17
- GitHub Advisory Database: [GHSA-4rjr-3gj2-5crq](https://github.com/advisories/GHSA-4rjr-3gj2-5crq), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2021-20332](https://nvd.nist.gov/vuln/detail/CVE-2021-20332), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-20332 · Whole record: https://cve.day/CVE-2021-20332.json · Rebuilt by cve.day 2026-11-25T22:58:02.919Z
