Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. xmlhttprequest-ssl
  4. ›
  5. CVE-2021-31597

CVE-2021-31597: Improper Certificate Validation

April 23, 2021 (updated December 8, 2021)

The xmlhttprequest-ssl package for Node.js disables SSL certificate validation by default, because rejectUnauthorized (when the property exists but is undefined) is considered to be false within the https.request function of Node.js. In other words, no certificate is ever rejected.

References

  • nvd.nist.gov/vuln/detail/CVE-2021-31597

Code Behaviors & Features

Detect and mitigate CVE-2021-31597 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.6.1

Fixed versions

  • 1.6.1

Solution

Upgrade to version 1.6.1 or above.

Impact 9.4 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L

Learn more about CVSS

Weakness

  • CWE-295: Improper Certificate Validation

Source file

npm/xmlhttprequest-ssl/CVE-2021-31597.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:44 +0000.