CVE-2021-22931

published 16 Aug 2021 · updated 14 Nov 2026

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.

10.0CriticalCVSS 9.8EPSS 22%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 22%. Fixed in 10.*, 11.*, 12.22.5 and 10 more.

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

Vendors, products and packages with version ranges

VendorProductVersionsFixed
nodejs>=10.0 <10.*, >=11.0 <11.*, >=12.0 <12.22.5, >=13.0 <13.*, >=14.0 <14.17.5, >=15.0 <15.*, >=16.0 <16.6.2, >=4.0 <4.*, >=5.0 <5.*, >=6.0 <6.*, >=7.0 <7.*, >=8.0 <8.*, >=9.0 <9.*10.*, 11.*, 12.22.5, 13.*, 14.17.5, 15.*, 16.6.2, 4.*, 5.*, 6.*, 7.*, 8.*, 9.*

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2021-22931 severity on Zeptric[![CVE-2021-22931](https://zeptric.io/badge/cve/CVE-2021-22931.svg)](https://zeptric.io/cve/CVE-2021-22931)