CVE-2020-36732: crypto-js uses insecure random numbers
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.67841%
CWE
Published
6/12/2023
Updated
1/6/2025
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| crypto-js | npm | < 3.2.1 | 3.2.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The commit diff shows the vulnerable secureRandom function was generating random numbers by creating a string '0.' + 3-byte integer and converting to float. This method limits entropy to 24 bits (3 bytes) and creates predictable float patterns. The patch replaced it with cryptoSecureRandomInt using 4-byte integers directly. The CWE-330/331 mapping confirms insufficient randomness/entropy, and the vulnerability description explicitly references this insecure concatenation pattern.