Lack of data validation - Type confusion In nodejs
Description
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.
Mitigation
Update Impact
Minimal update. May introduce new vulnerabilities or breaking changes.
Ecosystem | Component | Affected version | Patched versions |
|---|---|---|---|
debian 12 | 18.19.0+dfsg-6~deb12u1 | ||
debian 11 | 12.22.12~dfsg-1~deb11u5 | ||
debian 13 | 18.13.0+dfsg1-1.1 | ||
debian 14 | 18.13.0+dfsg1-1.1 | ||
rpm rhel8 | - | - | |
rpm rhel8.6 | 1:16.20.2-2.module+el8.6.0+19897+9590a839 | ||
rpm rhel9 | 1:16.20.1-1.el9_2 | ||
rpm rhel9.0 | 1:16.20.2-1.el9_0 | ||
npm | 16.20.1, 18.16.1, 20.3.1 |
Aliases
References