CVE-2021-22918 Out-of-Bounds Read in Node.js

Medium 5.3 Published Updated

An out-of-bounds read in Node.js allows attackers to disclose sensitive information or cause crashes via DNS resolution functions.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-22918?

CVE-2021-22918 is a medium-severity vulnerability in Nodejs Node.js, published on 12 Jul 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Node.js before 16.4.1, 14.17.2, 12.22.2 is vulnerable to an out-of-bounds read when uv__idna_toascii() is used to convert strings to ASCII. The pointer p is read and increased without checking whether it is beyond pe, with the latter holding a pointer to the end of the buffer. This can lead to information disclosures or crashes. This function can be triggered via uv_getaddrinfo().

Weakness: CWE-125

Which versions are affected by CVE-2021-22918?

2 open source packages ship an affected version, including node and node-min. It affects 2 products.

PackageAffectedFixed in
node BitnamiFrom 12.0.012.22.2, 14.17.2, 16.4.1
node-min BitnamiFrom 12.0.012.22.2, 14.17.2, 16.4.1
Linux distribution packages (10)
libuv AlmaLinux:8All versions1:1.41.1-1.el8_4
libuv-devel AlmaLinux:8All versions1:1.41.1-1.el8_4
libuv Red Hat:enterprise_linux:8::appstreamAll versions1:1.41.1-1.el8_4
libuv-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions1:1.41.1-1.el8_4
libuv-debugsource Red Hat:enterprise_linux:8::appstreamAll versions1:1.41.1-1.el8_4
libuv-debuginfo Red Hat:enterprise_linux:8::crbAll versions1:1.41.1-1.el8_4
libuv-debugsource Red Hat:enterprise_linux:8::crbAll versions1:1.41.1-1.el8_4
libuv-devel Red Hat:enterprise_linux:8::crbAll versions1:1.41.1-1.el8_4
libuv Rocky Linux:8All versions1:1.41.1-1.el8_4
libuv openSUSE:TumbleweedAll versions1.42.0-1.2

Products include Nodejs Node.js, Siemens Sinec Infrastructure Network Services.

How do I fix CVE-2021-22918?

Upgrade node to a fixed version for your release line: 12.22.2, 14.17.2 or 16.4.1.

Is CVE-2021-22918 being exploited?

There is no known exploitation of CVE-2021-22918 in the wild and no public exploit code.

All Nodejs Node.js vulnerabilities

Sources

Also known as ALPINE-CVE-2021-22918, ALSA-2021:3075, AZL-41581, BIT-node-2021-22918, BIT-node-min-2021-22918, DEBIAN-CVE-2021-22918 and 10 more.

Is CVE-2021-22918 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free