Vulnerabilities in pkg:npm/otpauth

PACKAGE
Advisory Summary

GHSA-rmmc-8cqj-hfp3 is a HIGH authentication bypass vulnerability (CWE-287: Improper Authentication) affecting Otpauth libraries in the npm ecosystem. The issue involves authentication bypass in otpauth. Remediation is available by upgrading affected packages to version 3.2.8.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/otpauth

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/otpauth. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-rmmc-8cqj-hfp3 - HIGH Authentication Bypass in otpauth

GHSA-rmmc-8cqj-hfp3 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-rmmc-8cqj-hfp3
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-287: Improper Authentication
Affected Product Otpauth
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-rmmc-8cqj-hfp3

To remediate this vulnerability, upgrade all affected Otpauth dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

otpauth fixed: 3.2.8
npm install otpauth@3.2.8
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls otpauth

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-rmmc-8cqj-hfp3, inspect your project dependencies using npm:

npm ls otpauth

Analyze the terminal output to locate any version of Otpauth in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.8), your application is affected.

Note: The npm ls otpauth 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Otpauth, 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

Versions of `otpauth` prior to 3.2.8 are vulnerable to Authentication Bypass. The package's `totp.validate()` function may return positive values for single digit tokens even if they are invalid. This may allow attackers to bypass the OTP authentication by providing single digit tokens. ## Recommendation Upgrade to version 3.2.8 or later.

GHSA-rmmc-8cqj-hfp3 Affected Otpauth Versions

1 component(s)
Fixed Versions:
3.2.8
Product / Package Ecosystem Affected Versions Fixed Version
otpauth
npm
< 3.2.8
3.2.8

References

Frequently Asked Questions

What is GHSA-rmmc-8cqj-hfp3?
GHSA-rmmc-8cqj-hfp3 is a security vulnerability in Otpauth involving Authentication Bypass in otpauth under CWE-287: Improper Authentication.
Which Otpauth versions are affected?
Affected versions include releases prior to 3.2.8 across affected packages: otpauth.
What version fixes GHSA-rmmc-8cqj-hfp3?
Upgrading to 3.2.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is otpauth affected?
Yes, otpauth is affected in releases prior to 3.2.8. Upgrade your dependency to 3.2.8 or later.
What CWE is associated with GHSA-rmmc-8cqj-hfp3?
GHSA-rmmc-8cqj-hfp3 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check npm dependencies for GHSA-rmmc-8cqj-hfp3?
Run the dependency tree command: 'npm ls otpauth'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rmmc-8cqj-hfp3",
  "modified" : "2020-08-31T18:46:51Z",
  "published" : "2020-09-03T18:24:43Z",
  "aliases" : [ ],
  "summary" : "Authentication Bypass in otpauth",
  "details" : "Versions of `otpauth` prior to 3.2.8 are vulnerable to Authentication Bypass. The package's `totp.validate()` function may return positive values for single digit tokens even if they are invalid. This may allow attackers to bypass the OTP authentication by providing single digit tokens.\n\n\n## Recommendation\n\nUpgrade to version 3.2.8 or later.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "otpauth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.2.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1087"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T18:46:51Z",
    "nvd_published_at" : null
  }
}