Injection Vulnerability in Node.js Package - CVE-2021-44532

nodejs Updated 02 Oct 2025

Summary

24/02/2022
N/A
No i
Medium
5.3

UBUNTU-CVE-2021-44532: Node.js < 12.22.9, < 14.18.3, < 16.13.2, and < 17.3.1 converts SANs (Subject Alternative Names) to a string format. Affects nodejs versions 12.22.5~dfsg-5ubuntu1 – 12.22.9~dfsg-1ubuntu3.6. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Node.js is a popular JavaScript runtime built on Chrome's V8 JavaScript engine, enabling developers to build scalable network applications. The package 'nodejs' is widely used for server-side development and is known for its non-blocking, event-driven architecture. However, certain versions of Node.js are vulnerable to an injection issue that affects the validation of peer certificates, particularly when using Subject Alternative Names (SANs) in certificates.

Vulnerability Detail

Node.js versions prior to 12.22.9, 14.18.3, 16.13.2, and 17.3.1 have a vulnerability that allows an attacker to bypass name constraints in a certificate chain due to improper handling of SANs. This can lead to potential man-in-the-middle attacks, where an attacker could impersonate a legitimate server, compromising the security of data in transit. The vulnerability arises from the conversion of SANs to a string format, which is then used for hostname validation.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

If you cannot update the package immediately, you can revert the behavior to the previous version using the command-line option --security-revert when starting your Node.js application. This will disable the problematic SAN handling temporarily.

Conclusion

The CVE-2021-44532 vulnerability in Node.js poses a significant risk by allowing attackers to bypass important security checks in certificate validation. It is crucial for users of affected versions to update their Node.js installations to the latest patched versions to mitigate this risk. For those unable to update immediately, a temporary workaround is available.

See every vulnerability recorded for nodejs →

Share this vulnerability

FAQ

CVE-2021-44532 is a vulnerability in Node.js that allows attackers to bypass name constraints in certificates, potentially leading to man-in-the-middle attacks.

Node.js versions below 12.22.9, 14.18.3, 16.13.2, and 17.3.1 are affected by this vulnerability.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The CVSS score for this vulnerability is 5.3, indicating a medium severity level.

If an immediate update is not possible, you can use the --security-revert command-line option to temporarily disable the problematic SAN handling.

Related vulnerabilities

Recent vulnerabilities recorded for nodejs.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback