cve.bz

CVE-2021-22931 Improper Null Termination

9.8 criticalExploit referenceEPSS 22%Fix available

Critical (9.8). EPSS 22% estimated probability of exploitation activity in the next 30 days.

On this page
Node.js before 16.6.0, 14.17.4, and 12.22.4 is vulnerable to Remote Code Execution, XSS, Application crashes due to missing input validation of host names returned by Domain Name Servers in Node.js dns library which can lead to output of wrong hostnames (leading to Domain Hijacking) and injection vulnerabilities in applications using the library.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
22% (unchanged from 22% a week ago; 22% 30 days ago) estimated probability of exploitation activity in the next 30 days; 98th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: total, assessed 2024-01-11. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-20 Improper Input Validation
CWE-170 Improper Null Termination
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-22931 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-22931?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-22931?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-22931 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
NodeJS Nodefrom 4.0 before 4.*
NodeJS Nodefrom 5.0 before 5.*
NodeJS Nodefrom 6.0 before 6.*
NodeJS Nodefrom 7.0 before 7.*
NodeJS Nodefrom 8.0 before 8.*
NodeJS Nodefrom 9.0 before 9.*
NodeJS Nodefrom 10.0 before 10.*
NodeJS Nodefrom 11.0 before 11.*
NodeJS Nodefrom 12.0 before 12.22.5
NodeJS Nodefrom 13.0 before 13.*
NodeJS Nodefrom 14.0 before 14.17.5
NodeJS Nodefrom 15.0 before 15.*
NodeJS Nodefrom 16.0 before 16.6.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Red Hatenterprise_linux:8::appstreamnodejs, nodejs-docs, nodejs-devel and 3 more1:12.22.5-1.module+el8.4.0+12242+af52a4c7RHSA-2021:3623
Red Hatenterprise_linux:8::appstreamnodejs, nodejs-docs, nodejs-devel and 3 more1:14.17.5-1.module+el8.4.0+12247+e2879e58RHSA-2021:3666
Red Hatenterprise_linux:8::appstreamnodejs-nodemon0:2.0.3-1.module+el8.3.0+6519+9f98ed83RHSA-2021:3666
Red Hatenterprise_linux:8::appstreamnodejs-nodemon0:2.0.3-1.module+el8.4.0+11732+c668cc9fRHSA-2021:3623
Red Hatenterprise_linux:8::appstreamnodejs-packaging0:17-3.module+el8.1.0+3369+37ae6a45RHSA-2021:3623
Red Hatenterprise_linux:8::appstreamnodejs-packaging0:23-3.module+el8.3.0+6519+9f98ed83RHSA-2021:3666
Red Hatenterprise_linux:8::appstreamnpm1:6.14.14-1.12.22.5.1.module+el8.4.0+12242+af52a4c7RHSA-2021:3623
Red Hatenterprise_linux:8::appstreamnpm1:6.14.14-1.14.17.5.1.module+el8.4.0+12247+e2879e58RHSA-2021:3666
Red Hatrhel_eus:8.1::appstreamnodejs, nodejs-docs, nodejs-devel and 3 more1:12.22.5-1.module+el8.1.0+12238+63fe3aecRHSA-2021:3639
Red Hatrhel_eus:8.1::appstreamnodejs-nodemon0:1.18.3-1.module+el8.1.0+3369+37ae6a45RHSA-2021:3639
Red Hatrhel_eus:8.1::appstreamnodejs-packaging0:17-3.module+el8.1.0+3369+37ae6a45RHSA-2021:3639
Red Hatrhel_eus:8.1::appstreamnpm1:6.14.14-1.12.22.5.1.module+el8.1.0+12238+63fe3aecRHSA-2021:3639
10 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise Module for Web and Scripting 12nodejs1010.24.1-1.42.2SUSE-SU-2021:2823-1
SUSELinux Enterprise Module for Web and Scripting 12nodejs1212.22.5-1.35.1SUSE-SU-2021:2824-1
SUSELinux Enterprise Module for Web and Scripting 12nodejs1414.17.5-6.15.3SUSE-SU-2021:3184-1
SUSELinux Enterprise Module for Web and Scripting 15 SP2nodejs1010.24.1-1.39.2SUSE-SU-2021:2953-1
SUSELinux Enterprise Module for Web and Scripting 15 SP2, Linux Enterprise Module for Web and Scripting 15 SP3nodejs1212.22.5-4.19.1SUSE-SU-2021:2875-1
SUSELinux Enterprise Module for Web and Scripting 15 SP2, Linux Enterprise Module for Web and Scripting 15 SP3nodejs1414.17.5-5.15.5SUSE-SU-2021:3211-1
openSUSELeap 15.2nodejs1010.24.1-lp152.2.18.1openSUSE-SU-2021:1239-1
openSUSELeap 15.2nodejs1212.22.5-lp152.3.18.1openSUSE-SU-2021:1214-1
openSUSELeap 15.2nodejs1414.17.5-lp152.14.1openSUSE-SU-2021:1313-1
openSUSELeap 15.3nodejs1010.24.1-1.39.2openSUSE-SU-2021:2953-1
openSUSELeap 15.3nodejs1212.22.5-4.19.1openSUSE-SU-2021:2875-1
openSUSELeap 15.3nodejs1414.17.5-5.15.5openSUSE-SU-2021:3211-1
AlmaLinux8nodejs, nodejs-devel, nodejs-full-i18n1:12.22.5-1.module_el8.5.0+85+79a7b441ALSA-2021:3623
AlmaLinux8nodejs, nodejs-docs, nodejs-devel and 1 more1:12.22.5-1.module_el8.4.0+2529+af52a4c7ALSA-2021:3623
AlmaLinux8nodejs-nodemon2.0.3-1.module_el8.4.0+2521+c668cc9fALSA-2021:3623 ALSA-2021:3666
AlmaLinux8nodejs-packaging17-3.module_el8.3.0+2023+d2377ea3ALSA-2021:3623
AlmaLinux8nodejs-packaging17-3.module_el8.4.0+2224+b07ac28eALSA-2021:3623
AlmaLinux8nodejs-packaging17-3.module_el8.4.0+2521+c668cc9fALSA-2021:3623
AlmaLinux8nodejs-packaging23-3.module_el8.4.0+2522+3bd42762ALSA-2021:3666
AlmaLinux8nodejs-packaging23-3.module_el8.5.0+254+b4526b16ALSA-2021:3666
AlmaLinux8npm1:6.14.14-1.12.22.5.1.module_el8.4.0+2529+af52a4c7ALSA-2021:3623
AlmaLinux8npm1:6.14.14-1.12.22.5.1.module_el8.5.0+85+79a7b441ALSA-2021:3623
Rocky Linux8nodejs1:12.22.5-1.module+el8.4.0+647+e905fa21RLSA-2021:3623
Rocky Linux8nodejs1:14.17.5-1.module+el8.4.0+654+17ff1d38RLSA-2021:3666
Rocky Linux8nodejs-nodemon0:2.0.3-1.module+el8.3.0+100+234774f7RLSA-2021:3623 RLSA-2021:3666
Rocky Linux8nodejs-nodemon0:2.0.3-1.module+el8.4.0+638+5344c6f7RLSA-2021:3623 RLSA-2021:3666
Rocky Linux8nodejs-nodemon0:2.0.3-1.module+el8.6.0+982+9fdca2d4RLSA-2021:3623 RLSA-2021:3666
Rocky Linux8nodejs-packaging0:17-3.module+el8.3.0+101+f84c7154RLSA-2021:3623
Rocky Linux8nodejs-packaging0:23-3.module+el8.3.0+100+234774f7RLSA-2021:3666
Rocky Linux8nodejs-packaging0:23-3.module+el8.5.0+733+de4fee6cRLSA-2021:3666
Rocky Linux8nodejs-packaging0:23-3.module+el8.7.0+1071+4bdda2a8RLSA-2021:3666
Alpinev3.11, v3.12nodejs12.22.5-r0ALPINE-CVE-2021-22931
Alpinev3.13, v3.14, v3.15 and 9 morenodejs14.17.5-r0ALPINE-CVE-2021-22931
Alpinev3.14nodejs-current16.11.1-r0ALPINE-CVE-2021-22931
Alpinev3.15, v3.16, v3.17 and 7 morenodejs-current16.6.2-r0ALPINE-CVE-2021-22931
Azure Linux2nodejs16.14.0-1AZL-6743
Azure Linux2python-gevent21.1.2-3AZL-32282

From the distributions' data via OSV.dev: Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat Quay from version 3.4 consumes nodejs from RHEL, so security tracking is provided by the container health index on the customer portal [1]. Additionally there is no impact from this issue on Quay 3.3 and 3.2 because nodejs is only used at build time and is no longer shipped, starting with Quay 3.5 [2].

[1] https://catalog.redhat.com/software/containers/quay/quay-rhel8/600e03aadd19c7786c43ae49?container-tabs=security

[2] https://issues.redhat.com/browse/PROJQUAY-1409

Therefore Quay component is marked as "Will not fix" with impact LOW.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8nodejs:12-8040020210817133458.522a0ee4Fixed 2021-09-21RHSA-2021:3623
Red Hat Enterprise Linux 8nodejs:14-8040020210817165654.522a0ee4Fixed 2021-09-27RHSA-2021:3666
Red Hat Enterprise Linux 8.1 Extended Update Supportnodejs:12-8010020210817113128.c27ad7f8Fixed 2021-09-22RHSA-2021:3639
Red Hat Enterprise Linux 8.2 Extended Update Supportnodejs:12-8020020210817125332.4cda2c84Fixed 2021-09-22RHSA-2021:3638
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-nodejs14-nodejs-0:14.17.5-1.el7Fixed 2021-08-26RHSA-2021:3280
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-nodejs12-nodejs-0:12.22.5-1.el7Fixed 2021-08-26RHSA-2021:3281
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-nodejs12-nodejs-nodemon-0:2.0.3-5.el7Fixed 2021-08-26RHSA-2021:3281
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUSrh-nodejs14-nodejs-0:14.17.5-1.el7Fixed 2021-08-26RHSA-2021:3280
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUSrh-nodejs12-nodejs-0:12.22.5-1.el7Fixed 2021-08-26RHSA-2021:3281
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUSrh-nodejs12-nodejs-nodemon-0:2.0.3-5.el7Fixed 2021-08-26RHSA-2021:3281
Red Hat Enterprise Linux 8nodejs:16/nodejsNot affected
Red Hat Enterprise Linux 9nodejsNot affected
Red Hat Quay 3quay/quay-rhel8Will not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-22931.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-22-069-09Siemens SINEC INS2022-03-08MultipleSINEC INSnone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-20 (51).

References

Check your stackJSON