{"answers":{"affected":"10 open source packages ship an affected version, including github.com/mongodb/mongo-swift-driver, mongodb/mongodb and mongodb. It affects 5 products.","exploited":"There is no known exploitation of CVE-2021-32050 in the wild and no public exploit code.","fix":"Upgrade github.com/mongodb/mongo-swift-driver to 1.1.1 or later.","what":"CVE-2021-32050 is a medium-severity vulnerability in MongoDB C Driver, published on 29 Aug 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-32050 and fix it if it is affected.\n\nWhat it is: CVE-2021-32050 is a medium-severity vulnerability in MongoDB C Driver, published on 29 Aug 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2021-32050 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/mongodb/mongo-swift-driver (SwiftURL): affected from 1.0.0; fixed in 1.1.1\n- github.com/mongodb/mongo-swift-driver (SwiftURL): affected from 1.0.0; fixed in 1.1.1\n- mongodb/mongodb (Packagist): affected from 1.0.0; fixed in 1.9.2\n- mongodb/mongodb (Packagist): affected from 1.0.0; fixed in 1.9.2\n- mongodb (npm): affected from 3.6.0; fixed in 3.6.10\n- mongodb (npm): affected from 3.6.0; fixed in 3.6.10\n- mongodb (npm): affected from 4.0.0; fixed in 4.17.0\n- mongodb (npm): affected from 4.0.0; fixed in 4.17.0\n- mongodb (npm): affected from 5.0.0; fixed in 5.8.0\n- mongodb (npm): affected from 5.0.0; fixed in 5.8.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-32050/ (Markdown: https://insights.sbomify.com/CVE-2021-32050/index.md)","id":"CVE-2021-32050","markdown":"https://insights.sbomify.com/CVE-2021-32050/index.md","name":"CVE-2021-32050","record":{"aliases":["DEBIAN-CVE-2021-32050","GHSA-vxvm-qww3-2fh7","JLSEC-2026-178","MINI-xmcp-g5p7-ffr7","UBUNTU-CVE-2021-32050"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"MongoDB database drivers","requires_auth":"high_privilege","summary":"MongoDB drivers may leak authentication data to application logs if the command listener feature is enabled, exposing sensitive credentials.","user_interaction":"required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mongodb","cpe":[{"product":"c\\+\\+","vendor":"mongodb"},{"product":"c_driver","vendor":"mongodb"},{"product":"node.js","vendor":"mongodb"},{"product":"php_driver","vendor":"mongodb"},{"product":"swift_driver","vendor":"mongodb"}],"cvss":{"score":4.2,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-532","name":"Insertion of Sensitive Information into Log File"},{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"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.\n\nWithout 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).\n\nThis 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).","ecosystems":["Packagist","SwiftURL","npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"MongoDB Driver may publish events containing authentication-related data","id":"CVE-2021-32050","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"information_disclosure","year":"2021"},"n_packages":10,"n_references":6,"next":{"headline":"SQL injection in n/a","id":"CVE-2021-32051"},"packages":[{"ecosystem":"Packagist","fixed":["1.9.2"],"introduced":["1.0.0"],"last_affected":[],"package":"mongodb/mongodb","purl":null,"source":"GHSA-vxvm-qww3-2fh7"},{"ecosystem":"Packagist","fixed":["1.9.2"],"introduced":["1.0.0"],"last_affected":[],"package":"mongodb/mongodb","purl":"pkg:composer/mongodb/mongodb","source":"GHSA-vxvm-qww3-2fh7"},{"ecosystem":"SwiftURL","fixed":["1.1.1"],"introduced":["1.0.0"],"last_affected":[],"package":"github.com/mongodb/mongo-swift-driver","purl":null,"source":"GHSA-vxvm-qww3-2fh7"},{"ecosystem":"SwiftURL","fixed":["1.1.1"],"introduced":["1.0.0"],"last_affected":[],"package":"github.com/mongodb/mongo-swift-driver","purl":"pkg:swift/github.com/mongodb/mongo-swift-driver","source":"GHSA-vxvm-qww3-2fh7"},{"ecosystem":"npm","fixed":["3.6.10"],"introduced":["3.6.0"],"last_affected":[],"package":"mongodb","purl":null,"source":"GHSA-vxvm-qww3-2fh7"},{"ecosystem":"npm","fixed":["3.6.10"],"introduced":["3.6.0"],"last_affected":[],"package":"mongodb","purl":"pkg:npm/mongodb","source":"GHSA-vxvm-qww3-2fh7"},{"ecosystem":"npm","fixed":["4.17.0"],"introduced":["4.0.0"],"last_affected":[],"package":"mongodb","purl":null,"source":"GHSA-vxvm-qww3-2fh7"},{"ecosystem":"npm","fixed":["4.17.0"],"introduced":["4.0.0"],"last_affected":[],"package":"mongodb","purl":"pkg:npm/mongodb","source":"GHSA-vxvm-qww3-2fh7"},{"ecosystem":"npm","fixed":["5.8.0"],"introduced":["5.0.0"],"last_affected":[],"package":"mongodb","purl":null,"source":"GHSA-vxvm-qww3-2fh7"},{"ecosystem":"npm","fixed":["5.8.0"],"introduced":["5.0.0"],"last_affected":[],"package":"mongodb","purl":"pkg:npm/mongodb","source":"GHSA-vxvm-qww3-2fh7"}],"prev":{"headline":"Large aggregation pipelines with a specific stage can crash mongod under default configuration","id":"CVE-2021-32040"},"products":["MongoDB C Driver","MongoDB C++ Driver","MongoDB Node.js Driver","MongoDB PHP Driver","MongoDB Swift Driver"],"published":"2023-08-29","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-11-03","vendors":["MongoDB Inc"]},"summary":"MongoDB drivers may leak authentication data to application logs if the command listener feature is enabled, exposing sensitive credentials.","url":"https://insights.sbomify.com/CVE-2021-32050/"}