# CVE-2021-23451: Insecure Randomness

- Severity: Medium 6.5 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.93%, higher than 59% of CVEs (2026-11-30)
- Published: 2022-07-25T14:11:12.623Z
- Modified: 2026-06-17T03:38:47.263Z
- Also known as: GHSA-6x93-h9g3-9phr
- Weaknesses: CWE-330
- Assigned by: snyk

## Description

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.

(As written by CVE List.)

## Affected

- otp-generator: from unspecified before 3.0.0
- otp-generator (npm): before 3.0.0
- otp-generator_project otp-generator: before 3.0.0

## Every score

- snyk: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://security.snyk.io/vuln/SNYK-JS-OTPGENERATOR-1655480> (issue-tracking, patch, third-party-advisory, web)
- <https://github.com/Maheshkumar-Kakade/otp-generator/issues/12> (issue-tracking, third-party-advisory, web)
- <https://github.com/Maheshkumar-Kakade/otp-generator/commit/b27de1ce439ae7f533cec26677e9698671275b70> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23451> (advisory)
- <https://github.com/Maheshkumar-Kakade/otp-generator> (package)

## Sources

- CVE List: [CVE-2021-23451](https://www.cve.org/CVERecord?id=CVE-2021-23451), CVE Terms of Use, modified 2024-09-17
- GitHub Advisory Database: [GHSA-6x93-h9g3-9phr](https://github.com/advisories/GHSA-6x93-h9g3-9phr), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2021-23451](https://nvd.nist.gov/vuln/detail/CVE-2021-23451), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-23451 · Whole record: https://cve.day/CVE-2021-23451.json · Rebuilt by cve.day 2026-11-25T22:58:07.724Z
