CVE-2017-16028: Randomatic Cryptographically Weak PRNG Vulnerability
MODERATECVE-2017-16028 is a MODERATE (CVSS 5.3) cryptographically weak prng vulnerability (CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)) affecting Randomatic libraries in the npm ecosystem. The issue involves cryptographically weak prng in randomatic. Remediation is available by upgrading affected packages to version 3.0.0.
CVE-2017-16028 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.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2017-16028
To remediate this vulnerability, upgrade all affected Randomatic 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 randomatic@3.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls randomatic
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2017-16028, inspect your project dependencies using npm:
npm ls randomatic
Analyze the terminal output to locate any version of Randomatic in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.0), your application is affected.
Note: The npm ls randomatic 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-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG), where the product uses a pseudo-random number generator (prng) in a security context, but the prng's algorithm is not cryptographically strong. In Randomatic, 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-2017-16028 Affected Randomatic Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
randomatic
|
npm |
< 3.0.0
|
3.0.0
|
References
Frequently Asked Questions
What is CVE-2017-16028?
Which Randomatic versions are affected?
What version fixes CVE-2017-16028?
Is randomatic affected?
What is the CVSS score of CVE-2017-16028?
What CWE is associated with CVE-2017-16028?
How can I check npm dependencies for CVE-2017-16028?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6g33-f262-xjp4",
"modified" : "2023-09-08T20:56:26Z",
"published" : "2018-10-09T00:57:21Z",
"aliases" : [ "CVE-2017-16028" ],
"summary" : "Cryptographically Weak PRNG in randomatic",
"details" : "Affected versions of `randomatic` generate random values using a cryptographically weak psuedo-random number generator. This may result in predictable values instead of random values as intended.\n\n\n\n\n## Recommendation\n\nUpdate to version 3.0.0 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "randomatic"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-16028"
}, {
"type" : "WEB",
"url" : "https://github.com/jonschlinkert/randomatic/commit/4a526959b3a246ae8e4a82f9c182180907227fe1#diff-b9cfc7f2cdf78a7f4b91a753d10865a2"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-6g33-f262-xjp4"
}, {
"type" : "WEB",
"url" : "https://github.com/tableflip/react-native-meteor-oauth/blob/a7eb738b74c469f5db20296b44b7cae4e2337435/src/meteor-oauth.js#L66"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/157"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-330", "CWE-338" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:19:13Z",
"nvd_published_at" : null
}
}