CVE-2021-23451 Insecure Randomness

Medium 6.5 Published Updated

Insecure random number generation in the otp-generator library allows attackers to brute-force one-time passwords and potentially take over accounts.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-23451?

CVE-2021-23451 is a medium-severity vulnerability in otp-generator, published on 25 Jul 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-330

Which versions are affected by CVE-2021-23451?

2 open source packages ship an affected version, including otp-generator. It affects 1 product.

PackageAffectedFixed in
otp-generator npmAll versions3.0.0
otp-generator npmAll versions3.0.0

Products include Otp-Generator Project Otp-Generator.

How do I fix CVE-2021-23451?

Upgrade otp-generator to 3.0.0 or later.

Is CVE-2021-23451 being exploited?

There is no known exploitation of CVE-2021-23451 in the wild and no public exploit code.

Sources

Also known as GHSA-6x93-h9g3-9phr.

Is CVE-2021-23451 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free