GHSA-6qqf-vvcr-7qrv: Generate password Cryptographically Weak PRNG Vulnerability
MODERATEGHSA-6qqf-vvcr-7qrv is a MODERATE cryptographically weak prng vulnerability (CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)) affecting Generate password libraries in the npm ecosystem. The issue involves cryptographically weak prng in generate-password. Remediation is available by upgrading affected packages to version 1.4.1.
GHSA-6qqf-vvcr-7qrv at a Glance
How to Fix GHSA-6qqf-vvcr-7qrv
To remediate this vulnerability, upgrade all affected Generate password 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 generate-password@1.4.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls generate-password
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-6qqf-vvcr-7qrv, inspect your project dependencies using npm:
npm ls generate-password
Analyze the terminal output to locate any version of Generate password in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.1), your application is affected.
Note: The npm ls generate-password 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 Generate password, 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
GHSA-6qqf-vvcr-7qrv Affected Generate password Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
generate-password
|
npm |
< 1.4.1
|
1.4.1
|
References
Frequently Asked Questions
What is GHSA-6qqf-vvcr-7qrv?
Which Generate password versions are affected?
What version fixes GHSA-6qqf-vvcr-7qrv?
Is generate-password affected?
What CWE is associated with GHSA-6qqf-vvcr-7qrv?
How can I check npm dependencies for GHSA-6qqf-vvcr-7qrv?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6qqf-vvcr-7qrv",
"modified" : "2020-08-31T18:34:48Z",
"published" : "2019-05-23T09:27:22Z",
"aliases" : [ ],
"summary" : "Cryptographically Weak PRNG in generate-password",
"details" : "Affected versions of generate-password generate random values that are biased towards certain characters depending on the chosen character sets. This may result in guessable passwords.\n\n\n## Recommendation\n\nUpdate to version 1.4.1 or later.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "generate-password"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.4.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/brendanashworth/generate-password/pull/26"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/762"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-338" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2019-05-23T07:38:39Z",
"nvd_published_at" : null
}
}