All reports
Medium

Improper one time password handling in devise-two-factor

Affected versions

Affected versions
< 4.0.2
Fixed version
4.0.2

Exploitation

CVE-2021-43177

Probability of exploitation in the next 30 days: 0.88%

FIRST EPSS · 2026-11-22

Description

Impact

As a result of an incomplete fix for CVE-2015-7225, in versions of devise-two-factor prior to 4.0.2 it is possible to reuse a One-Time-Password (OTP) for one (and only one) immediately trailing interval.

Patches

This vulnerability has been patched in version 4.0.2 which was released on March 24th, 2022. Individuals using this package are strongly encouraged to upgrade as soon as possible.

Credit for discovery

Benoit Côté-Jodoin Michael Nipper - https://github.com/tinfoil/devise-two-factor/issues/106

Links