CVE-2021-22939
npm vulnerability analysis and mitigation

Overview

If the Node.js https API was used incorrectly and "undefined" was passed for the "rejectUnauthorized" parameter, no error was returned and connections to servers with an expired certificate would have been accepted. This vulnerability affects all versions of Node.js 12.x prior to 12.22.5, 14.x prior to 14.17.5, and 16.x prior to 16.6.2 (Node.js Blog).

Technical details

The vulnerability is related to improper certificate validation (CWE-295) in the Node.js HTTPS API. When "undefined" is passed as the value for the "rejectUnauthorized" parameter, the API fails to properly validate expired certificates, allowing connections that should be rejected. The vulnerability has been assigned a CVSS v3.1 base score of 5.3 MEDIUM (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N) (NVD).

Impact

A successful exploitation of this vulnerability could allow an attacker to establish connections to servers with expired certificates, potentially leading to man-in-the-middle attacks and compromising the security of HTTPS connections (Node.js Blog).

Mitigation and workarounds

The vulnerability has been fixed in Node.js versions 12.22.5, 14.17.5, and 16.6.2. Users should upgrade to these or later versions. The fix ensures proper validation of certificates even when "undefined" is passed as the rejectUnauthorized parameter (Node.js Blog).

Additional resources


SourceThis report was generated using AI

Related npm vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-64756HIGH7.5
  • JavaScriptJavaScript
  • nodejs:22::nodejs-full-i18n
NoYesNov 17, 2025
CVE-2025-6965HIGH7.2
  • SQLiteSQLite
  • rust-lldb
NoYesJul 15, 2025
CVE-2025-7458MEDIUM6.9
  • SQLiteSQLite
  • mingw32-sqlite
NoYesJul 29, 2025
CVE-2025-64118MEDIUM6.1
  • JavaScriptJavaScript
  • npm
NoYesOct 30, 2025
CVE-2025-52099N/AN/A
  • SQLiteSQLite
  • thunderbird-debuginfo
NoYesOct 24, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management