CVE-2021-23451
CRITICAL 9.8CVSS 3.1otp-generator before v3.0.0 insecurely generates random one-time passwords
The package otp-generator before 3.0.0 are vulnerable to Insecure Randomness due to insecure generation of random one-time passwords, which may allow a brute-force attack.
- Published
- 25 Jul 2022
- Last modified
- 17 Jun 2026
- Assigned by
- report@snyk.io
- NVD status
- Modified
- Weakness
- CWE-330
- Also known as
- GHSA-6x93-h9g3-9phr
- Sources
- NVDJSONOSV GHSA-6x93-h9g3-9phrJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | report@snyk.io (Secondary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | otp-generator_project | otp-generatorcpe:2.3:a:otp-generator_project:otp-generator:*:*:*:*:*:node.js:*:* |
< 3.0.0 | 3.0.0 |
| OSV | npm | otp-generator | < 3.0.0 | 3.0.0 |
References
- https://github.com/Maheshkumar-Kakade/otp-generator/commit/b27de1ce439ae7f533cec26677e9698671275b70 · Patch, Third Party Advisory, WEB
- https://github.com/Maheshkumar-Kakade/otp-generator/issues/12 · Issue Tracking, Third Party Advisory, WEB
- https://security.snyk.io/vuln/SNYK-JS-OTPGENERATOR-1655480 · Issue Tracking, Patch, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-23451 · ADVISORY
- https://github.com/Maheshkumar-Kakade/otp-generator · PACKAGE
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 25 Jul 2022)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 26 Jul 2022)