← back
CVE-2021-22939

CVE-2021-22939

EPSS 14.7%CWE-295
In short

Node.js failed to validate an incorrectly configured HTTPS setting, allowing connections to servers with expired SSL certificates when the rejectUnauthorized parameter was set to undefined. This creates a security risk because expired certificates should be rejected to prevent man-in-the-middle attacks.

Technical detail

When the rejectUnauthorized parameter in the Node.js https API was set to undefined instead of an explicit boolean value, certificate validation was silently disabled. An attacker controlling a server with an expired certificate could intercept HTTPS connections if the application relied on this misconfiguration, as the validation error was not raised and the connection was accepted.

Summary generated and translated by AI from the official description.
If the Node.js https API was used incorrectly and "undefined" was in passed for the "rejectUnauthorized" parameter, no error was returned and connections to servers with an expired certificate would have been accepted.
Affected products
NodeJS · Node

Want to know if your infrastructure is exposed to this?

Talk to TrueHacking →