Vulnerabilities / CVE-2021-22931

critical

CVE-2021-22931

nodejs: Improper handling of untypical characters in domain names

Published Modified CWE 170, 20
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat5.0CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
Bitnami9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD, Bitnami, CBL-Mariner, Photon OS. Rated lower by AlmaLinux (high), Oracle (high), Rocky Linux (high), Red Hat (medium).

Description

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.

Affected packages and fixed versions

SourcePackageFixed in
bitnami::Bitnami Vulnerability Databasenode, node-min12.12.1, 12.22.5, 14.14.1, 14.17.5, 16.6.2
CBL-Mariner 1.0nodejs0:14.17.5-1.cm1
CBL-Mariner 2.0nodejs, python-gevent0:16.14.0-1.cm2 and 1 more
Photon OS 4.0nodejs, nodejs-devel14.17.5-1.ph4
alma 8nodejs:12::nodejs, nodejs:12::nodejs-devel, nodejs:12::nodejs-docs and 6 more1:12.22.5-1.module_el8.4.0+2529+af52a4c7 and 4 more
alpine 3.11nodejs12.22.5-r0
alpine 3.12nodejs12.22.5-r0
alpine 3.13nodejs14.17.5-r0
alpine 3.14nodejs, nodejs-current14.17.5-r0 and 1 more
alpine 3.15nodejs, nodejs-current14.17.5-r0 and 1 more
alpine 3.16nodejs, nodejs-current14.17.5-r0 and 1 more
alpine 3.17nodejs, nodejs-current14.17.5-r0 and 1 more
Show all 69 entries from 22 sources
SourcePackageFixed in
bitnami::Bitnami Vulnerability Databasenode12.12.1, 12.22.5, 14.14.1, 14.17.5, 16.6.2
bitnami::Bitnami Vulnerability Databasenode-min12.12.1, 12.22.5, 14.14.1, 14.17.5, 16.6.2
CBL-Mariner 1.0nodejs0:14.17.5-1.cm1
CBL-Mariner 2.0nodejs0:16.14.0-1.cm2
CBL-Mariner 2.0python-gevent0:21.1.2-3.cm2
Photon OS 4.0nodejs14.17.5-1.ph4
Photon OS 4.0nodejs-devel14.17.5-1.ph4
alma 8nodejs:12::nodejs1:12.22.5-1.module_el8.4.0+2529+af52a4c7
alma 8nodejs:12::nodejs-devel1:12.22.5-1.module_el8.4.0+2529+af52a4c7
alma 8nodejs:12::nodejs-docs1:12.22.5-1.module_el8.4.0+2529+af52a4c7
alma 8nodejs:12::nodejs-full-i18n1:12.22.5-1.module_el8.4.0+2529+af52a4c7
alma 8nodejs:12::nodejs-nodemon2.0.3-1.module_el8.4.0+2521+c668cc9f
alma 8nodejs:12::nodejs-packaging17-3.module_el8.3.0+2023+d2377ea3
alma 8nodejs:12::npm1:6.14.14-1.12.22.5.1.module_el8.4.0+2529+af52a4c7
alma 8nodejs:14::nodejs-nodemon2.0.3-1.module_el8.4.0+2521+c668cc9f
alma 8nodejs:14::nodejs-packaging23-3.module_el8.4.0+2522+3bd42762
alpine 3.11nodejs12.22.5-r0
alpine 3.12nodejs12.22.5-r0
alpine 3.13nodejs14.17.5-r0
alpine 3.14nodejs14.17.5-r0
alpine 3.14nodejs-current16.11.1-r0
alpine 3.15nodejs14.17.5-r0
alpine 3.15nodejs-current16.6.2-r0
alpine 3.16nodejs14.17.5-r0
alpine 3.16nodejs-current16.6.2-r0
alpine 3.17nodejs14.17.5-r0
alpine 3.17nodejs-current16.6.2-r0
alpine 3.18nodejs14.17.5-r0
alpine 3.18nodejs-current16.6.2-r0
alpine 3.19nodejs14.17.5-r0
alpine 3.19nodejs-current16.6.2-r0
alpine 3.20nodejs14.17.5-r0
alpine 3.20nodejs-current16.6.2-r0
alpine 3.21nodejs14.17.5-r0
alpine 3.21nodejs-current16.6.2-r0
alpine 3.22nodejs14.17.5-r0
alpine 3.22nodejs-current16.6.2-r0
alpine 3.23nodejs14.17.5-r0
alpine 3.23nodejs-current16.6.2-r0
alpine 3.24nodejs14.17.5-r0
alpine 3.24nodejs-current16.6.2-r0
alpine edgenodejs14.17.5-r0
alpine edgenodejs-current16.6.2-r0
Oracle Linux 8nodejs1:14.17.5-1.module+el8.4.0+20313+f90c2973
Oracle Linux 8nodejs-devel1:14.17.5-1.module+el8.4.0+20313+f90c2973
Oracle Linux 8nodejs-docs1:14.17.5-1.module+el8.4.0+20313+f90c2973
Oracle Linux 8nodejs-full-i18n1:14.17.5-1.module+el8.4.0+20313+f90c2973
Oracle Linux 8nodejs-nodemon2.0.3-1.module+el8.4.0+20281+eb64e322
Oracle Linux 8nodejs-packaging23-3.module+el8.3.0+7818+6cd30d85
Oracle Linux 8npm1:6.14.14-1.14.17.5.1.module+el8.4.0+20313+f90c2973
rocky 8nodejs1:12.22.5-1.module+el8.4.0+647+e905fa21
rocky 8nodejs-devel1:12.22.5-1.module+el8.4.0+647+e905fa21
rocky 8nodejs-docs1:12.22.5-1.module+el8.4.0+647+e905fa21
rocky 8nodejs-full-i18n1:12.22.5-1.module+el8.4.0+647+e905fa21
rocky 8nodejs:12::nodejs1:12.22.5-1.module+el8.4.0+647+e905fa21
rocky 8nodejs:12::nodejs-devel1:12.22.5-1.module+el8.4.0+647+e905fa21
rocky 8nodejs:12::nodejs-docs1:12.22.5-1.module+el8.4.0+647+e905fa21
rocky 8nodejs:12::nodejs-full-i18n1:12.22.5-1.module+el8.4.0+647+e905fa21
rocky 8nodejs:12::nodejs-nodemon2.0.3-1.module+el8.6.0+982+9fdca2d4
rocky 8nodejs:12::nodejs-packaging23-3.module+el8.7.0+1071+4bdda2a8
rocky 8nodejs:12::npm1:6.14.14-1.12.22.5.1.module+el8.4.0+647+e905fa21
rocky 8nodejs:14::nodejs1:14.17.5-1.module+el8.4.0+654+17ff1d38
rocky 8nodejs:14::nodejs-devel1:14.17.5-1.module+el8.4.0+654+17ff1d38
rocky 8nodejs:14::nodejs-docs1:14.17.5-1.module+el8.4.0+654+17ff1d38
rocky 8nodejs:14::nodejs-full-i18n1:14.17.5-1.module+el8.4.0+654+17ff1d38
rocky 8nodejs:14::nodejs-nodemon2.0.3-1.module+el8.4.0+638+5344c6f7
rocky 8nodejs:14::nodejs-packaging23-3.module+el8.5.0+733+de4fee6c
rocky 8nodejs:14::npm1:6.14.14-1.14.17.5.1.module+el8.4.0+654+17ff1d38
rocky 8npm1:6.14.14-1.12.22.5.1.module+el8.4.0+647+e905fa21

References

All 43 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.