Authentication Bypass in otpauth

otpauth Updated 02 Oct 2025

Summary

03/09/2020
HIGH
Yes i
High
Not published

GHSA-rmmc-8cqj-hfp3: Authentication Bypass in otpauth. Affects otpauth versions < 3.2.8. Fixed in 3.2.8. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The otpauth package is an npm package that provides functionality for generating and validating one-time passwords (OTP). It is commonly used in applications that require two-factor authentication (2FA) or OTP-based authentication. The package allows users to generate and validate OTPs using the Time-based One-Time Password (TOTP) algorithm.

Vulnerability Detail

Versions of otpauth prior to 3.2.8 are vulnerable to an Authentication Bypass vulnerability. The package's totp.validate() function may incorrectly validate single digit tokens, allowing attackers to bypass OTP authentication by providing invalid single digit tokens. This vulnerability can potentially lead to unauthorized access to systems or accounts protected by OTP authentication.

How To Fix

Minimum fixed version

3.2.8

This is the first release that contains the fix.

npm install otpauth@3.2.8

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to upgrade to the fixed version of the otpauth package to mitigate the risk of authentication bypass.

Conclusion

The otpauth package prior to version 3.2.8 is vulnerable to an authentication bypass issue that allows attackers to bypass OTP authentication by providing single digit tokens. To mitigate this vulnerability, it is crucial to upgrade to version 3.2.8 or later. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for otpauth →

Share this vulnerability

FAQ

This vulnerability allows attackers to bypass OTP authentication by providing single digit tokens, potentially leading to unauthorized access to systems or accounts.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and the Vulert Playground will analyze it for vulnerabilities in real-time.

Yes, all versions of otpauth prior to 3.2.8 are vulnerable to this authentication bypass issue.

Yes, upgrading to version 3.2.8 or later of the otpauth package fixes this vulnerability.

No, there is no known workaround for this vulnerability. Upgrading to the fixed version is the recommended solution.

How To Fix

Minimum fixed version

3.2.8

This is the first release that contains the fix.

npm install otpauth@3.2.8

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback