CVE-2023-30590
npm vulnerability analysis and mitigation

Overview

The vulnerability (CVE-2023-30590) affects the generateKeys() API function in Node.js's crypto.createDiffieHellman() implementation. The issue was discovered in Node.js versions 16.x, 18.x, and 20.x, where there is an inconsistency between the documented behavior and actual implementation of the generateKeys() function. The vulnerability was disclosed in June 2023 (Node Advisory).

Technical details

The generateKeys() API function returned from crypto.createDiffieHellman() only generates missing (or outdated) keys, specifically generating a private key only if none has been set yet. However, the documentation incorrectly states that this API call 'Generates private and public Diffie-Hellman key values'. This discrepancy between documented and actual behavior is classified under CWE-1068 - Inconsistency Between Implementation and Documented Design (Node Advisory).

Impact

The inconsistency between documented and actual behavior could lead to security issues in applications that use these APIs, particularly since DiffieHellman may be used as the basis for application-level security. The vulnerability has been rated as Medium severity (Node Advisory).

Mitigation and workarounds

The issue has been addressed in Node.js versions v16.20.1 (LTS), v18.16.1 (LTS), and v20.3.1 (Current). The fix primarily involves updating the documentation to accurately reflect the actual behavior of the generateKeys() function (Node Advisory).

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
  • lerna
NoYesNov 17, 2025
CVE-2025-52099HIGH7.5
  • SQLiteSQLite
  • nodejs:22::npm
NoYesOct 24, 2025
CVE-2025-6965HIGH7.2
  • SQLiteSQLite
  • mingw32-sqlite-debuginfo
NoYesJul 15, 2025
CVE-2025-7458MEDIUM6.9
  • SQLiteSQLite
  • nodejs-packaging-bundler
NoYesJul 29, 2025
CVE-2025-64118MEDIUM6.1
  • JavaScriptJavaScript
  • tar
NoYesOct 30, 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