LiveActive security incident?Get immediate response
CVE Record

CVE-2021-23451: Insecure Randomness

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.

MediumCVSS 6.5Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2021-23451 affects the npm package otp-generator before 3.0.0. It used insecure randomness when creating one-time passwords, making generated codes less resistant to guessing. Business urgency depends on whether this package protects login, account recovery, transactions, or other sensitive workflows.

Executive priority

Treat as a moderate dependency risk. Prioritize remediation quickly where OTPs protect customer authentication, recovery, payments, or privileged actions. For non-security uses, handle through normal dependency update cycles.

Technical view

The vulnerability is insecure OTP generation in otp-generator before 3.0.0. The CVSS 3.1 vector is network-reachable, low complexity, unauthenticated, and requires no user interaction, with limited confidentiality and integrity impact. The source bundle indicates a brute-force risk, but does not provide active exploitation evidence.

Likely exposure

Exposure is likely limited to applications that depend on otp-generator before 3.0.0 and use its output for security-sensitive OTP flows. Systems using different OTP libraries or non-security uses are not shown as affected by the provided sources.

Exploitation context

The CVE is not listed as KEV, and the provided sources do not claim active exploitation. The practical risk is weaker OTP unpredictability, which may reduce resistance to guessing when paired with permissive retry, rate-limit, or monitoring controls.

Researcher notes

The bundle identifies insecure randomness and a brute-force risk, with references to Snyk, a GitHub issue, and a fixing commit. It does not provide CWE mapping, affected CPEs, detailed exploit evidence, or active exploitation claims.

Mitigation direction

  • Upgrade otp-generator to version 3.0.0 or later.
  • Review vendor and package-maintainer guidance before deployment.
  • Enforce rate limiting and lockout controls around OTP verification.
  • Monitor OTP failure patterns for abnormal guessing activity.
  • Rotate or invalidate outstanding OTPs after upgrading if business impact justifies it.

Validation and detection

  • Inventory package manifests and lockfiles for otp-generator versions before 3.0.0.
  • Identify applications where otp-generator output protects authentication or verification workflows.
  • Confirm production deployments use the upgraded dependency version.
  • Review OTP retry limits, expiry windows, and alerting controls.
  • Check security monitoring for unusual OTP validation failures.
Prepared
Confidence
medium
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2021-23451 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
6.5 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
4Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
6.5CVSS 3.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N3.92.5Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

6.5Medium
CVSS 3.1 vector shape for CVE-2021-23451Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
n/aotp-generatorunspecifiedListed
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.