Vulnerabilities in pkg:npm/otpauth
PACKAGEGHSA-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.
pkg:npm/otpauth
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
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.
npm install otpauth@3.2.8
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
GHSA-rmmc-8cqj-hfp3 Affected Otpauth Versions
1 component(s)| 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?
Which Otpauth versions are affected?
What version fixes GHSA-rmmc-8cqj-hfp3?
Is otpauth affected?
What CWE is associated with GHSA-rmmc-8cqj-hfp3?
How can I check npm dependencies for GHSA-rmmc-8cqj-hfp3?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}