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_idnatoascii() 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_idnatoascii() 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).

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-2025-64756HIGH7.5
  • JavaScriptJavaScript
  • nodejs:22::nodejs-full-i18n
NoYesNov 17, 2025
CVE-2025-6965HIGH7.2
  • SQLiteSQLite
  • nodejs:22::nodejs-packaging-bundler
NoYesJul 15, 2025
CVE-2025-7458MEDIUM6.9
  • SQLiteSQLite
  • nodejs-docs
NoYesJul 29, 2025
CVE-2025-64118MEDIUM6.1
  • JavaScriptJavaScript
  • kibana-8.19
NoYesOct 30, 2025
CVE-2025-52099N/AN/A
  • SQLiteSQLite
  • firefox
NoYesOct 24, 2025

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