CVE-2021-44532: Certificate Verification Bypass via String Injection
It was found that node.js did not safely read the x509 certificate generalName format properly, resulting in data injection. A certificate could use a specially crafted extension in order to be successfully validated, permitting an attacker to impersonate a trusted host.
Other sources
Node.js < 12.22.9, < 14.18.3, < 16.13.2, and < 17.3.1 converts SANs (Subject Alternative Names) to a string format. It uses this string to check peer certificates against hostnames when validating connections. The string format was subject to an injection vulnerability when name constraints were used within a certificate chain, allowing the bypass of these name constraints.Versions of Node.js with the fix for this escape SANs containing the problematic characters in order to prevent the injection. This behavior can be reverted through the --security-revert command-line option.
Node.js converts SANs (Subject Alternative Names) to a string format. It uses this string to check peer certificates against hostnames when validating connections. The string format was subject to an injection vulnerability when name constraints were used within a certificate chain, allowing the bypass of these name constraints.
Versions of Node.js with the fix for this escape SANs containing the problematic characters in order to prevent the injection.
Reference: https://nodejs.org/en/blog/vulnerability/jan-2022-security-releases/
— Red Hat
Node.js converts SANs (Subject Alternative Names) to a string format. It uses this string to check peer certificates against hostnames when validating connections. The string format was subject to an injection vulnerability when name constraints were used within a certificate chain, allowing the bypass of these name constraints.
Versions of Node.js with the fix for this escape SANs containing the problematic characters in order to prevent the injection. This behavior can be reverted through the --security-revert command-line option.
More details will be available at CVE-2021-44532 after publication.
This vulnerability was reported by Google.
All versions of the 17.x, 16.x, 14.x, and 12.x releases lines.
— Node.Js
Node.js converts SANs (Subject Alternative Names) to a string format. It uses this string to check peer certificates against hostnames when validating connections. The string format was subject to an injection vulnerability when name constraints were used within a certificate chain, allowing the bypass of these name constraints. See https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532 for more details.
— Node.Js
Node.js could allow a remote attacker to bypass security restrictions, caused by a string injection vulnerability when name constraints were used within a certificate chain. An attacker could exploit this vulnerability to bypass the name constraints.
— IBM
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/rh-nodejs12-nodejsto a version that resolves this vulnerability.Fixed in 0:12.22.12-2.el7 - Upgrade
Upgrade
redhat/rh-nodejs14-nodejsto a version that resolves this vulnerability.Fixed in 0:14.20.1-2.el7 - Upgrade
Upgrade
redhat/nodeto a version that resolves this vulnerability.Fixed in 12.22.9 - Upgrade
Upgrade
redhat/nodeto a version that resolves this vulnerability.Fixed in 14.18.3 - Upgrade
Upgrade
redhat/nodeto a version that resolves this vulnerability.Fixed in 16.13.2 - Upgrade
Upgrade
redhat/nodeto a version that resolves this vulnerability.Fixed in 17.3.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 12.22.9Fixed in 14.18.3Fixed in 16.13.2Fixed in 17.3.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 12.22.9 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 14.18.3 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 16.13.2 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 17.3.1 - Upgrade
Upgrade
debian/nodejsto a version that resolves this vulnerability.Fixed in 18.20.4+dfsg-1~deb12u2Fixed in 18.20.4+dfsg-1~deb12u3Fixed in 20.19.2+dfsg-1+deb13u2Fixed in 20.19.2+dfsg-1+deb13u3Fixed in 24.21.0+dfsg+~cs24.13.4-1Fixed in 24.22.2+dfsg+~cs24.19.2-1 - Upgrade
Upgrade
alpine/nodejsto a version that resolves this vulnerability.Fixed in 12.22.10-r0 - Upgrade
Upgrade
alpine/nodejsto a version that resolves this vulnerability.Fixed in 14.19.0-r0 - Upgrade
Upgrade
alpine/nodejsto a version that resolves this vulnerability.Fixed in 16.13.2-r0 - Upgrade
Upgrade
alpine/nodejs-currentto a version that resolves this vulnerability.Fixed in 17.3.1-r0 - Upgrade
Upgrade
alpine/openjdk11to a version that resolves this vulnerability.Fixed in 11.0.15_p10-r0 - Upgrade
Upgrade
Node.jsto a version that resolves this vulnerability.Fixed in 12.22.9 - Upgrade
Upgrade
Node.jsto a version that resolves this vulnerability.Fixed in 14.18.3 - Upgrade
Upgrade
Node.jsto a version that resolves this vulnerability.Fixed in 16.13.2 - Upgrade
Upgrade
Node.jsto a version that resolves this vulnerability.Fixed in 17.3.1
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2021-44532?
CVE-2021-44532 is a vulnerability in Node.js that allows a remote attacker to bypass security restrictions caused by a string injection vulnerability.
Which versions of Node.js are affected by CVE-2021-44532?
Node.js versions < 12.22.9, < 14.18.3, < 16.13.2, and < 17.3.1 are affected by CVE-2021-44532.
How does CVE-2021-44532 work?
CVE-2021-44532 occurs when Node.js converts SANs (Subject Alternative Names) to a string format, which was subject to an injection vulnerability when name constraints were used.
What is the severity of CVE-2021-44532?
CVE-2021-44532 has a severity rating of 7.4 (high).
What is the Common Weakness Enumeration (CWE) ID for CVE-2021-44532?
CVE-2021-44532 is associated with CWE-295 and CWE-296.