Time-Based One-Time Password (TOTP) Reuse Affecting devise-two-factor package, versions <4.0.2


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.07% (30th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Time-Based One-Time Password (TOTP) Reuse vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUBY-DEVISETWOFACTOR-2411377
  • published10 Apr 2022
  • disclosed23 Feb 2022
  • creditBenoit Côté-Jodoin

Introduced: 23 Feb 2022

CVE-2021-43177  (opens in a new tab)
CWE-330  (opens in a new tab)

How to fix?

Upgrade devise-two-factor to version 4.0.2 or higher.

Overview

Affected versions of this package are vulnerable to Time-Based One-Time Password (TOTP) Reuse due to an improper fix of CVE-2015-7225, which makes it possible to reuse the OPT after 1 interval (30 seconds by default). If otp_allowed_drift is configured, the OTP will be valid for the entire duration of that drift period.

CVSS Scores

version 3.1