{"answers":{"affected":"2 open source packages ship an affected version, including mongodb-client-encryption. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-20327 in the wild and no public exploit code.","fix":"Upgrade mongodb-client-encryption to 1.2.1 or later.","what":"CVE-2021-20327 is a medium-severity vulnerability in MongoDB Node.js Driver mongodb-client-encryption module, published on 25 Feb 2021. 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-20327 and fix it if it is affected.\n\nWhat it is: CVE-2021-20327 is a medium-severity vulnerability in MongoDB Node.js Driver mongodb-client-encryption module, published on 25 Feb 2021. 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-20327 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- mongodb-client-encryption (npm): affected from 1.2.0; fixed in 1.2.1\n- mongodb-client-encryption (npm): affected from 1.2.0; fixed in 1.2.1\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-20327/ (Markdown: https://insights.sbomify.com/CVE-2021-20327/index.md)","id":"CVE-2021-20327","markdown":"https://insights.sbomify.com/CVE-2021-20327/index.md","name":"CVE-2021-20327","record":{"aliases":["GHSA-rjmf-p882-645m"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","security_bypass"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"MongoDB Node.js encryption library","requires_auth":"none","summary":"An attacker with privileged network position can intercept traffic and bypass client-side field level encryption due to missing KMS certificate validation.","user_interaction":"required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mongodb","cpe":[{"product":"mongodb_client_encryption","vendor":"mongodb"}],"cvss":{"score":6.4,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-295","name":"Improper Certificate Validation"}],"description":"A specific version of the Node.js mongodb-client-encryption module does not perform correct validation of the KMS server’s certificate. This vulnerability in combination with a privileged network position active MITM attack could result in interception of traffic between the Node.js driver and the KMS service rendering client-side field level encryption (CSFLE) ineffective. This issue was discovered during internal testing and affects mongodb-client-encryption module version 1.2.0, which was available from 2021-Jan-29 and deprecated in the NPM Registry on 2021-Feb-04. This vulnerability does not impact driver traffic payloads with CSFLE-supported key services from applications residing inside the AWS, GCP, and Azure nework fabrics due to compensating controls in these environments. This issue does not impact driver workloads that don’t use Field Level Encryption. This issue affect MongoDB Node.js Driver mongodb-client-encryption module version 1.2.0","ecosystems":["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 Node.js client side field level encryption library may not be validating KMS certificate","id":"CVE-2021-20327","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"security_feature_bypass","year":"2021"},"n_packages":2,"n_references":1,"next":{"headline":"MongoDB Java driver client-side field level encryption not verifying KMS host name","id":"CVE-2021-20328"},"packages":[{"ecosystem":"npm","fixed":["1.2.1"],"introduced":["1.2.0"],"last_affected":[],"package":"mongodb-client-encryption","purl":null,"source":"GHSA-rjmf-p882-645m"},{"ecosystem":"npm","fixed":["1.2.1"],"introduced":["1.2.0"],"last_affected":[],"package":"mongodb-client-encryption","purl":"pkg:npm/mongodb-client-encryption","source":"GHSA-rjmf-p882-645m"}],"prev":{"headline":"Specially crafted query may result in a denial of service of mongod","id":"CVE-2021-20326"},"products":["MongoDB Node.js Driver mongodb-client-encryption module"],"published":"2021-02-25","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":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-09-16","vendors":["MongoDB Inc."]},"summary":"An attacker with privileged network position can intercept traffic and bypass client-side field level encryption due to missing KMS certificate validation.","url":"https://insights.sbomify.com/CVE-2021-20327/"}