CVE Program
CNA-CVE-2023-30590
Details
The generateKeys() API function returned from crypto.createDiffieHellman() only generates missing (or outdated) keys, that is, it only generates a private key if none has been set yet, but the function is also needed to compute the corresponding public key after calling setPrivateKey(). However, the documentation says this API call: "Generates private and public Diffie-Hellman key values".
The documented behavior is very different from the actual behavior, and this difference could easily lead to security issues in applications that use these APIs as the DiffieHellman may be used as the basis for application-level security, implications are consequently broad.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Node.js | node | From 4.0 before 5 From 5.0 before 6 From 6.0 before 7 From 7.0 before 8 From 8.0 before 9 From 9.0 before 10 From 10.0 before 11 From 11.0 before 12 From 12.0 before 13 From 13.0 before 14 From 14.0 before 15 From 15.0 before 16 From 16.0 before 16.20.1 (fixed in 16.20.1) From 17.0 before 18 From 18.0 before 18.16.1 (fixed in 18.16.1) From 19.0 before 20 From 20.0 before 20.3.1 (fixed in 20.3.1) |