CVE-2021-22918
npm vulnerability analysis and mitigation

Overview

Node.js before versions 16.4.1, 14.17.2, and 12.22.2 was discovered to contain an out-of-bounds read vulnerability in the uv__idna_toascii() function, which is used to convert strings to ASCII. The vulnerability was disclosed on July 1, 2021, and affects all versions of the 16.x, 14.x, and 12.x release lines. The issue occurs when 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 (Node Blog, NVD).

Technical details

The vulnerability exists in libuv's uv__idna_toascii() function which is used by Node's dns module's lookup() function. The core issue involves an out-of-bounds read operation where a pointer is manipulated without proper boundary checks against the buffer's end pointer. This can be triggered through the uv_getaddrinfo() function. The vulnerability has been assigned a CVSS v3.1 Base Score of 5.3 (Medium) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N (NVD).

Impact

The exploitation of this vulnerability can lead to information disclosures or application crashes. The out-of-bounds read condition allows attackers to potentially access sensitive information outside the intended buffer boundaries (Node Blog, Gentoo).

Exploitability

The vulnerability is remotely exploitable and requires no authentication or user interaction. It has been publicly disclosed and discussed, though there are no confirmed reports of active exploitation in the wild (NetApp).

Mitigation and workarounds

The vulnerability has been fixed in Node.js versions 16.4.1, 14.17.2, and 12.22.2. Users are advised to upgrade to these or later versions. For systems using libuv directly, upgrading to version 1.41.1 or later is recommended. No workarounds are available for this vulnerability, making upgrading the only effective mitigation strategy (Node Blog, Gentoo).

Additional resources


SourceThis report was generated using AI

Related npm vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-56848HIGH7.5
  • npm logonpm
  • nodejs:22::v8-12.4-devel
NoYesAug 04, 2026
CVE-2026-58045MEDIUM6.2
  • npm logonpm
  • nodejs-22
NoYesAug 04, 2026
CVE-2026-58042MEDIUM5.9
  • npm logonpm
  • nodejs:22::nodejs-nodemon
NoYesAug 04, 2026
CVE-2026-58041MEDIUM5.3
  • npm logonpm
  • nodejs24-devel
NoYesAug 04, 2026
CVE-2026-58044LOW3.7
  • npm logonpm
  • nodejs22-devel
NoYesAug 04, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management