CVE-2023-30590: Node.js Diffie-Hellman Key Generation Documentation Mismatch
- Vendor
- Nodejs
CVE-2023-30590 is a discrepancy between the documented and actual behavior of generateKeys() on DiffieHellman objects created by Node.js crypto.createDiffieHellman(). Although the documentation states that the method generates private and public Diffie-Hellman key values, the implementation generates only missing or outdated keys and generates a private key only if none has already been set. The method is also used to compute the corresponding public key after setPrivateKey(), so calling it does not necessarily create a fresh key pair. Applications relying on the documented behavior can consequently make incorrect assumptions about key generation and renewal, undermining application-level security. Affected maintained branches at disclosure included Node.js 16 before 16.20.1, 18 before 18.16.1, and 20 before 20.3.1; older release lines were also affected.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Applications that incorrectly assume generateKeys() replaces an existing private key may retain key material they intended to renew, potentially compromising the integrity guarantees of application-level cryptographic protocols. Weak or predictable shared secrets have been identified as a theoretical consequence, but the actual impact depends on application logic and key handling. This is a developer-facing API documentation hazard rather than an independently exploitable cryptographic primitive failure. The assigned CVSS v3.1 score is 7.5, with high integrity impact and no assessed confidentiality or availability impact.
Mitigation
If you can’t patch tonight, do this now.
Audit Diffie-Hellman key lifecycle logic, particularly calls to generateKeys() on objects with an existing private key. Do not treat that call as proof that a fresh private key was generated. Where fresh keys are required, explicitly implement and verify fresh key generation rather than relying on repeated calls on an already initialized object. No vendor-specific temporary workaround is identified.
Remediation
Patch, then assume compromise.
Install vendor-provided Node.js updates addressing CVE-2023-30590 and use a currently supported release. The original upstream update thresholds were 16.20.1, 18.16.1, and 20.3.1; distribution packages may contain backported fixes. Debian fixes include 10.24.0~dfsg-1~deb10u4 for Debian 10 and 12.22.12~dfsg-1~deb11u5 for Debian 11. The correction aligns the documentation with the existing implementation rather than making generateKeys() unconditionally regenerate keys. Review and correct application code that relies on the former documentation, since updating Node.js alone does not repair those assumptions.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2023-30590 exploited in the wild?
- As of Nov 7, 2026, Mallory has no reports of CVE-2023-30590 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2023-30590?
- As of Nov 7, 2026, Mallory has found no public exploit for CVE-2023-30590.
- Is there a patch for CVE-2023-30590?
- Install vendor-provided Node.js updates addressing CVE-2023-30590 and use a currently supported release. The original upstream update thresholds were 16.20.1, 18.16.1, and 20.3.1; distribution packages may contain backported fixes.
- What products are affected by CVE-2023-30590?
- Nodejs.
- How severe is CVE-2023-30590?
- CVE-2023-30590 has a CVSS v3.1 score of 7.5 (High) and an EPSS score of 1.5% (74th percentile) as of Nov 7, 2026.
Recent activity
15 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.