CVE-2020-36732: Crypto js Crypto-js Uses Insecure Random Numbers Vulnerability
MODERATECVE-2020-36732 is a MODERATE (CVSS 5.3) crypto-js uses insecure random numbers vulnerability (CWE-331: Insufficient Entropy) affecting Crypto js libraries in the npm ecosystem. The issue involves crypto-js uses insecure random numbers. Remediation is available by upgrading affected packages to version 3.2.1.
CVE-2020-36732 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2020-36732
To remediate this vulnerability, upgrade all affected Crypto js dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install crypto-js@3.2.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls crypto-js
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-36732, inspect your project dependencies using npm:
npm ls crypto-js
Analyze the terminal output to locate any version of Crypto js in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.1), your application is affected.
Note: The npm ls crypto-js command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-331: Insufficient Entropy, where the product uses an algorithm or scheme that produces insufficient entropy, leaving patterns or clusters of values that are more likely to occur than others. In Crypto js, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-36732 Affected Crypto js Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
crypto-js
|
npm |
≥ 3.2.0
< 3.2.1
All 1 versions
3.2.0
|
3.2.1
|
References
Frequently Asked Questions
What is CVE-2020-36732?
Which Crypto js versions are affected?
What version fixes CVE-2020-36732?
Is crypto-js affected?
What is the CVSS score of CVE-2020-36732?
What CWE is associated with CVE-2020-36732?
How can I check npm dependencies for CVE-2020-36732?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3w3w-pxmm-2w2j",
"modified" : "2026-03-16T21:31:59Z",
"published" : "2023-06-12T03:30:17Z",
"aliases" : [ "CVE-2020-36732" ],
"summary" : "crypto-js uses insecure random numbers",
"details" : "The crypto-js package 3.2.0 for Node.js generates random numbers by concatenating the string \"0.\" with an integer, which makes the output more predictable than necessary.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "crypto-js"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.2.0"
}, {
"fixed" : "3.2.1"
} ]
} ],
"versions" : [ "3.2.0" ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-36732"
}, {
"type" : "WEB",
"url" : "https://github.com/brix/crypto-js/issues/254"
}, {
"type" : "WEB",
"url" : "https://github.com/brix/crypto-js/issues/256"
}, {
"type" : "WEB",
"url" : "https://github.com/brix/crypto-js/pull/257/commits/e4ac157d8b75b962d6538fc0b996e5d4d5a9466b"
}, {
"type" : "WEB",
"url" : "https://github.com/brix/crypto-js/commit/b405ff597fb3ac76a7bdfbc72dca10ba1079b1d5"
}, {
"type" : "WEB",
"url" : "https://github.com/brix/crypto-js/commit/e4ac157d8b75b962d6538fc0b996e5d4d5a9466b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/brix/crypto-js"
}, {
"type" : "WEB",
"url" : "https://github.com/brix/crypto-js/compare/3.2.0...3.2.1"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20230706-0003"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JS-CRYPTOJS-548472"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-330", "CWE-331" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-13T12:44:48Z",
"nvd_published_at" : "2023-06-12T02:15:48Z"
}
}