{"id":"UBUNTU-CVE-2021-22931","details":"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.","modified":"2025-07-16T08:15:31.885556Z","published":"2021-08-16T19:15:00Z","withdrawn":"2025-07-18T16:46:39Z","upstream":["CVE-2021-22931"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2021-22931"},{"type":"REPORT","url":"https://nodejs.org/en/blog/vulnerability/aug-2021-security-releases/#cares-upgrade-improper-handling-of-untypical-characters-in-domain-names-high-cve-2021-22931"},{"type":"REPORT","url":"https://nodejs.org/en/blog/vulnerability/aug-2021-security-releases/"},{"type":"REPORT","url":"https://hackerone.com/reports/1178337"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2021-22931"}],"affected":[{"package":{"name":"nodejs","ecosystem":"Ubuntu:Pro:14.04:LTS","purl":"pkg:deb/ubuntu/nodejs@0.10.25~dfsg2-2ubuntu1.2+esm1?arch=source&distro=trusty/esm"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.10.25~dfsg2-2ubuntu1.2+esm1"}]}],"versions":["0.10.15~dfsg1-4","0.10.21~dfsg1-1","0.10.22~dfsg1-2","0.10.23~dfsg1-1","0.10.23~dfsg1-2","0.10.23~dfsg1-3","0.10.24~dfsg1-1","0.10.25~dfsg2-2","0.10.25~dfsg2-2ubuntu1","0.10.25~dfsg2-2ubuntu1.2"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro","binaries":[{"binary_name":"nodejs","binary_version":"0.10.25~dfsg2-2ubuntu1.2+esm1"},{"binary_name":"nodejs-dbg","binary_version":"0.10.25~dfsg2-2ubuntu1.2+esm1"},{"binary_name":"nodejs-dbgsym","binary_version":"0.10.25~dfsg2-2ubuntu1.2+esm1"},{"binary_name":"nodejs-dev","binary_version":"0.10.25~dfsg2-2ubuntu1.2+esm1"},{"binary_version":"0.10.25~dfsg2-2ubuntu1.2+esm1","binary_name":"nodejs-dev-dbgsym"},{"binary_name":"nodejs-legacy","binary_version":"0.10.25~dfsg2-2ubuntu1.2+esm1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-22931.json"}},{"package":{"name":"nodejs","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/nodejs@4.2.6~dfsg-1ubuntu4.2+esm2?arch=source&distro=esm-apps/xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.2.6~dfsg-1ubuntu4.2+esm2"}]}],"versions":["0.10.25~dfsg2-2ubuntu1","4.2.2~dfsg-1","4.2.3~dfsg-1","4.2.4~dfsg-1ubuntu1","4.2.4~dfsg-2","4.2.6~dfsg-1ubuntu1","4.2.6~dfsg-1ubuntu4","4.2.6~dfsg-1ubuntu4.1","4.2.6~dfsg-1ubuntu4.2","4.2.6~dfsg-1ubuntu4.2+esm1"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_name":"nodejs","binary_version":"4.2.6~dfsg-1ubuntu4.2+esm2"},{"binary_name":"nodejs-dbg","binary_version":"4.2.6~dfsg-1ubuntu4.2+esm2"},{"binary_name":"nodejs-dbgsym","binary_version":"4.2.6~dfsg-1ubuntu4.2+esm2"},{"binary_name":"nodejs-dev","binary_version":"4.2.6~dfsg-1ubuntu4.2+esm2"},{"binary_name":"nodejs-dev-dbgsym","binary_version":"4.2.6~dfsg-1ubuntu4.2+esm2"},{"binary_name":"nodejs-legacy","binary_version":"4.2.6~dfsg-1ubuntu4.2+esm2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-22931.json"}},{"package":{"name":"nodejs","ecosystem":"Ubuntu:Pro:18.04:LTS","purl":"pkg:deb/ubuntu/nodejs@8.10.0~dfsg-2ubuntu0.4+esm2?arch=source&distro=esm-apps/bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.10.0~dfsg-2ubuntu0.4+esm2"}]}],"versions":["6.11.4~dfsg-1ubuntu1","6.11.4~dfsg-1ubuntu2","6.12.0~dfsg-1ubuntu1","6.12.0~dfsg-2ubuntu1","6.12.0~dfsg-2ubuntu2","8.10.0~dfsg-2","8.10.0~dfsg-2ubuntu0.2","8.10.0~dfsg-2ubuntu0.3","8.10.0~dfsg-2ubuntu0.4","8.10.0~dfsg-2ubuntu0.4+esm1"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_name":"nodejs","binary_version":"8.10.0~dfsg-2ubuntu0.4+esm2"},{"binary_name":"nodejs-dbgsym","binary_version":"8.10.0~dfsg-2ubuntu0.4+esm2"},{"binary_name":"nodejs-dev","binary_version":"8.10.0~dfsg-2ubuntu0.4+esm2"},{"binary_name":"nodejs-doc","binary_version":"8.10.0~dfsg-2ubuntu0.4+esm2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-22931.json"}},{"package":{"name":"nodejs","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/nodejs@10.19.0~dfsg-3ubuntu1.1?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"10.19.0~dfsg-3ubuntu1.1"}]}],"versions":["10.15.2~dfsg-2ubuntu1","10.17.0~dfsg-2ubuntu4","10.17.0~dfsg-2ubuntu6","10.19.0~dfsg-3ubuntu1"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"libnode-dev","binary_version":"10.19.0~dfsg-3ubuntu1.1"},{"binary_name":"libnode64","binary_version":"10.19.0~dfsg-3ubuntu1.1"},{"binary_name":"libnode64-dbgsym","binary_version":"10.19.0~dfsg-3ubuntu1.1"},{"binary_name":"nodejs","binary_version":"10.19.0~dfsg-3ubuntu1.1"},{"binary_name":"nodejs-dbgsym","binary_version":"10.19.0~dfsg-3ubuntu1.1"},{"binary_name":"nodejs-doc","binary_version":"10.19.0~dfsg-3ubuntu1.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-22931.json"}},{"package":{"name":"nodejs","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/nodejs@12.22.9~dfsg-1ubuntu3?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"12.22.9~dfsg-1ubuntu3"}]}],"versions":["12.22.5~dfsg-5ubuntu1","12.22.7~dfsg-2ubuntu1","12.22.7~dfsg-2ubuntu3","12.22.9~dfsg-1ubuntu2"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"libnode-dev","binary_version":"12.22.9~dfsg-1ubuntu3"},{"binary_name":"libnode72","binary_version":"12.22.9~dfsg-1ubuntu3"},{"binary_version":"12.22.9~dfsg-1ubuntu3","binary_name":"libnode72-dbgsym"},{"binary_version":"12.22.9~dfsg-1ubuntu3","binary_name":"nodejs"},{"binary_name":"nodejs-dbgsym","binary_version":"12.22.9~dfsg-1ubuntu3"},{"binary_name":"nodejs-doc","binary_version":"12.22.9~dfsg-1ubuntu3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-22931.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}