Summary
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).
Impact
CVE-2021-32050 has a CVSS score of 4.2 (Medium). The vector is requires local access, high privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.9.2, 3.6.10, 4.17.0, 5.8.0, 1.1.1); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
mongodb/mongodb to 1.9.2 or later; mongodb to 3.6.10 or later; mongodb to 4.17.0 or later; mongodb to 5.8.0 or later; github.com/mongodb/mongo-swift-driver to 1.1.1 or later
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2021-32050? CVE-2021-32050 is a medium-severity security vulnerability in mongodb/mongodb (composer), affecting versions >= 1.0.0, < 1.9.2. It is fixed in 1.9.2, 3.6.10, 4.17.0, 5.8.0, 1.1.1.
- How severe is CVE-2021-32050? CVE-2021-32050 has a CVSS score of 4.2 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which packages are affected by CVE-2021-32050?
mongodb/mongodb(composer) (versions >= 1.0.0, < 1.9.2)mongodb(npm) (versions >= 3.6.0, < 3.6.10)github.com/mongodb/mongo-swift-driver(swift) (versions >= 1.0.0, < 1.1.1)
- Is there a fix for CVE-2021-32050? Yes. CVE-2021-32050 is fixed in 1.9.2, 3.6.10, 4.17.0, 5.8.0, 1.1.1. Upgrade to this version or later.
- Is CVE-2021-32050 exploitable, and should I be worried? Whether CVE-2021-32050 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2021-32050 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2021-32050?
- Upgrade
mongodb/mongodbto 1.9.2 or later - Upgrade
mongodbto 3.6.10 or later - Upgrade
mongodbto 4.17.0 or later - Upgrade
mongodbto 5.8.0 or later - Upgrade
github.com/mongodb/mongo-swift-driverto 1.1.1 or later
- Upgrade