CVE-2021-44531: Improper handling of URI Subject Alternative Names
A flaw was found in node.js where it accepted a certificate's Subject Alternative Names (SAN) entry, as opposed to what is specified by the HTTPS protocol. This flaw allows an active person-in-the-middle to forge a certificate and impersonate a trusted host.
Other sources
Accepting arbitrary Subject Alternative Name (SAN) types, unless a PKI is specifically defined to use a particular SAN type, can result in bypassing name-constrained intermediates. Node.js < 12.22.9, < 14.18.3, < 16.13.2, and < 17.3.1 was accepting URI SAN types, which PKIs are often not defined to use. Additionally, when a protocol allows URI SANs, Node.js did not match the URI correctly.Versions of Node.js with the fix for this disable the URI SAN type when checking a certificate against a hostname. This behavior can be reverted through the --security-revert command-line option.
Accepting arbitrary Subject Alternative Name (SAN) types, unless a PKI is specifically defined to use a particular SAN type, can result in bypassing name-constrained intermediates. Node.js was accepting URI SAN types, which PKIs are often not defined to use. Additionally, when a protocol allows URI SANs, Node.js did not match the URI correctly.
Versions of Node.js with the fix for this disable the URI SAN type when checking a certificate against a hostname.
Reference: https://nodejs.org/en/blog/vulnerability/jan-2022-security-releases/
— Red Hat
Accepting arbitrary Subject Alternative Name (SAN) types, unless a PKI is specifically defined to use a particular SAN type, can result in bypassing name-constrained intermediates. Node.js was accepting URI SAN types, which PKIs are often not defined to use. Additionally, when a protocol allows URI SANs, Node.js did not match the URI correctly.
Versions of Node.js with the fix for this disable the URI SAN type when checking a certificate against a hostname. This behavior can be reverted through the --security-revert command-line option.
More details will be available at CVE-2021-44531 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
Accepting arbitrary Subject Alternative Name (SAN) types, unless a PKI is specifically defined to use a particular SAN type, can result in bypassing name-constrained intermediates. Node.js was accepting URI SAN types, which PKIs are often not defined to use. Additionally, when a protocol allows URI SANs, Node.js did not match the URI correctly. See https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531 for more details.
— Node.Js
Node.js could allow a remote attacker to bypass security restrictions, caused by the improper handling of URI Subject Alternative Name (SAN) types. An attacker could exploit this vulnerability to bypass name-constrained intermediates.
— 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-44531?
CVE-2021-44531 is a vulnerability in Node.js that could allow a remote attacker to bypass security restrictions.
How does CVE-2021-44531 impact Node.js?
CVE-2021-44531 impacts Node.js versions < 12.22.9, < 14.18.3, < 16.13.2, and < 17.3.1 by accepting arbitrary Subject Alternative Name (SAN) types, potentially bypassing name-constrained intermediates.
What is the severity of CVE-2021-44531?
The severity of CVE-2021-44531 is high, with a severity value of 7.4.
How do I fix CVE-2021-44531 in Node.js?
To fix CVE-2021-44531 in Node.js, you should update to version 12.22.9 or later, 14.18.3 or later, 16.13.2 or later, or 17.3.1 or later.
Where can I find more information about CVE-2021-44531?
You can find more information about CVE-2021-44531 at the following references: [link1], [link2], [link3].