CVEfocus › CVE database › CVE-2021-22931

CVE-2021-22931

EPSS 22.0% (higher than 98% of CVEs)Published 2021-08-16Updated 2025-04-30Assigner: hackerone

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.

CWE-170

What to do

Likely to be exploited: EPSS gives a 22% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.

Fixed builds are available from AlmaLinux, Alpine, Red Hat, Rocky Linux: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

42Fixed
1Fix pending
9Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 16.04nodejsFix pending
Red Hat Enterprise Linux 9nodejsNot affected
Red Hat Enterprise Linux 9nodejs-docsNot affected
Red Hat Enterprise Linux 9nodejs-full-i18nNot affected
Red Hat Enterprise Linux 9nodejs-libsNot affected
Red Hat Enterprise Linux 9npmNot affected
Red Hat Enterprise Linux 8nodejsFixed1:12.22.5-1.module+el8.4.0+12242+af52a4c7RHSA-2021:3666
Red Hat Enterprise Linux 8nodejs-develFixed1:12.22.5-1.module+el8.4.0+12242+af52a4c7RHSA-2021:3666
Red Hat Enterprise Linux 8nodejs-docsFixed1:14.17.5-1.module+el8.4.0+12247+e2879e58RHSA-2021:3623
Red Hat Enterprise Linux 8nodejs-full-i18nFixed1:14.17.5-1.module+el8.4.0+12247+e2879e58RHSA-2021:3623
Red Hat Enterprise Linux 8nodejs-libsNot affected
Red Hat Enterprise Linux 8nodejs-nodemonFixed0:2.0.3-1.module+el8.4.0+11732+c668cc9fRHSA-2021:3666
Red Hat Enterprise Linux 8nodejs-packagingFixed0:23-3.module+el8.3.0+6519+9f98ed83RHSA-2021:3623
Red Hat Enterprise Linux 8nodejs-packaging-bundlerNot affected
Red Hat Enterprise Linux 8npmFixed1:6.14.14-1.14.17.5.1.module+el8.4.0+12247+e2879e58RHSA-2021:3623
Red Hat Enterprise Linux 8v8-12.4-develNot affected
Red Hat Enterprise Linux 8v8-13.6-develNot affected
AlmaLinux 8nodejsFixed1:12.22.5-1.module_el8.5.0+85+79a7b441ALSA-2021:3623
AlmaLinux 8nodejs-develFixed1:12.22.5-1.module_el8.4.0+2529+af52a4c7ALSA-2021:3623
AlmaLinux 8nodejs-docsFixed1:12.22.5-1.module_el8.4.0+2529+af52a4c7ALSA-2021:3623
AlmaLinux 8nodejs-full-i18nFixed1:12.22.5-1.module_el8.4.0+2529+af52a4c7ALSA-2021:3623
AlmaLinux 8nodejs-nodemonFixed2.0.3-1.module_el8.4.0+2521+c668cc9fALSA-2021:3623
AlmaLinux 8nodejs-packagingFixed23-3.module_el8.5.0+254+b4526b16ALSA-2021:3666
AlmaLinux 8npmFixed1:6.14.14-1.12.22.5.1.module_el8.5.0+85+79a7b441ALSA-2021:3623
Rocky Linux 8nodejsFixed1:14.17.5-1.module+el8.4.0+654+17ff1d38RLSA-2021:3623
Rocky Linux 8nodejs-nodemonFixed0:2.0.3-1.module+el8.3.0+100+234774f7RLSA-2021:3623
Rocky Linux 8nodejs-packagingFixed0:23-3.module+el8.3.0+100+234774f7RLSA-2021:3623
Alpine Linux 3.24nodejsFixed14.17.5-r0ALPINE-CVE-2021-22931
Alpine Linux 3.24nodejs-currentFixed16.6.2-r0ALPINE-CVE-2021-22931
Alpine Linux 3.23nodejsFixed14.17.5-r0ALPINE-CVE-2021-22931
Alpine Linux 3.23nodejs-currentFixed16.6.2-r0ALPINE-CVE-2021-22931
Alpine Linux 3.22nodejsFixed14.17.5-r0ALPINE-CVE-2021-22931
Alpine Linux 3.22nodejs-currentFixed16.6.2-r0ALPINE-CVE-2021-22931
Alpine Linux 3.21nodejsFixed14.17.5-r0ALPINE-CVE-2021-22931
Alpine Linux 3.21nodejs-currentFixed16.6.2-r0ALPINE-CVE-2021-22931
Alpine Linux 3.20nodejsFixed14.17.5-r0ALPINE-CVE-2021-22931
Alpine Linux 3.20nodejs-currentFixed16.6.2-r0ALPINE-CVE-2021-22931
Alpine Linux 3.19nodejsFixed14.17.5-r0ALPINE-CVE-2021-22931
Alpine Linux 3.19nodejs-currentFixed16.6.2-r0ALPINE-CVE-2021-22931
Alpine Linux 3.18nodejsFixed14.17.5-r0ALPINE-CVE-2021-22931
Alpine Linux 3.18nodejs-currentFixed16.6.2-r0ALPINE-CVE-2021-22931
Alpine Linux 3.17nodejsFixed14.17.5-r0ALPINE-CVE-2021-22931
Alpine Linux 3.17nodejs-currentFixed16.6.2-r0ALPINE-CVE-2021-22931
Alpine Linux 3.16nodejsFixed14.17.5-r0ALPINE-CVE-2021-22931
Alpine Linux 3.16nodejs-currentFixed16.6.2-r0ALPINE-CVE-2021-22931
Alpine Linux 3.15nodejsFixed14.17.5-r0ALPINE-CVE-2021-22931
Alpine Linux 3.15nodejs-currentFixed16.6.2-r0ALPINE-CVE-2021-22931
Alpine Linux 3.14nodejsFixed14.17.5-r0ALPINE-CVE-2021-22931
Alpine Linux 3.14nodejs-currentFixed16.11.1-r0ALPINE-CVE-2021-22931
Alpine Linux 3.13nodejsFixed14.17.5-r0ALPINE-CVE-2021-22931
Alpine Linux 3.12nodejsFixed12.22.5-r0ALPINE-CVE-2021-22931
Alpine Linux 3.11nodejsFixed12.22.5-r0ALPINE-CVE-2021-22931

What the vendor says

As published in the CVE record by hackerone, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.