CVE-2018-1000620: Cryptiles Insufficient Entropy Vulnerability
CRITICALCVE-2018-1000620 is a CRITICAL (CVSS 9.8) insufficient entropy vulnerability (CWE-331: Insufficient Entropy) affecting Cryptiles libraries in the npm ecosystem. The issue involves insufficient entropy in cryptiles. Remediation is available by upgrading affected packages to version 4.1.2, 3.1.3.
CVE-2018-1000620 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2018-1000620
To remediate this vulnerability, upgrade all affected Cryptiles 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 cryptiles@4.1.2
npm install cryptiles@3.1.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls cryptiles
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2018-1000620, inspect your project dependencies using npm:
npm ls cryptiles
Analyze the terminal output to locate any version of Cryptiles in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.1.2), your application is affected.
Note: The npm ls cryptiles 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 Cryptiles, 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-2018-1000620 Affected Cryptiles Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
cryptiles
|
npm |
≥ 4.0.0
< 4.1.2
|
4.1.2
|
|
cryptiles
|
npm |
≥ 3.1.0
< 3.1.3
|
3.1.3
|
References
Frequently Asked Questions
What is CVE-2018-1000620?
Which Cryptiles versions are affected?
What version fixes CVE-2018-1000620?
Is cryptiles affected?
What is the CVSS score of CVE-2018-1000620?
What CWE is associated with CVE-2018-1000620?
How can I check npm dependencies for CVE-2018-1000620?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rq8g-5pc5-wrhr",
"modified" : "2026-06-08T15:52:36Z",
"published" : "2018-09-11T18:22:50Z",
"aliases" : [ "CVE-2018-1000620" ],
"summary" : "Insufficient Entropy in cryptiles",
"details" : "Versions of `cryptiles` prior to 4.1.2 are vulnerable to Insufficient Entropy. The `randomDigits()` method does not provide sufficient entropy and its generates digits that are not evenly distributed.\n\n\n## Recommendation\n\nUpgrade to version 4.1.2. The package is deprecated and has been moved to `@hapi/cryptiles` and it is strongly recommended to use the maintained package.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "cryptiles"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.1.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "cryptiles"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.1.0"
}, {
"fixed" : "3.1.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-1000620"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/cryptiles/issues/34"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/cryptiles/issues/35"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/cryptiles/commit/6bdcd0f6ee8ade96e7b30350bad39ee0c2ef0f9b"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/cryptiles/commit/9332d4263a32b84e76bf538d7470d01ea63fa047"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/cryptiles/commit/cb6bd642816e0cb8341d2b3896fd9e7c57e94f56"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/hapijs/cryptiles"
}, {
"type" : "WEB",
"url" : "https://github.com/nodejs/security-wg/blob/master/vuln/npm/476.json"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1464"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/720"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-331" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:55:29Z",
"nvd_published_at" : "2018-07-09T20:29:00Z"
}
}