Skip to content
Fencer Intel
medium 5.3

CVE-2021-43177 json

Improper one time password handling in devise-two-factor

published 4y ago modified 2mo ago also GHSA-jm35-h8q2-73mp , EUVD-2022-1774

cvss
5.3
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
0.9%
EPSS 0.9% chance of exploitation in 30 days, percentile 59%
public exploits
0
none known

Summary

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. CVSS Vector: (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N)

Patch / fix

  • rubygems devise-two-factor 4.0.2
  • tinfoilsecurity devise-two-factor 4.0.2
  • ruby-devise-two-factor Debian 12 4.0.2-1

debian advisories DEBIAN-CVE-2021-43177

  • ruby-devise-two-factor Ubuntu Pro 20.04 LTS 3.1.0-2ubuntu0.1~esm1
  • ruby-devise-two-factor Ubuntu Pro 22.04 LTS 4.0.0-2ubuntu0.1~esm1

ubuntu advisories UBUNTU-CVE-2021-43177

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Is CVE-2021-43177 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Exploit prediction

0.88% chance of exploitation in the next 30 days, higher than 59% of all scored CVEs (FIRST EPSS, 2026-11-09).

CVSS scores

assigned by version score vector
NVD 3.1 5.3 CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N
NVD 2.0 3.5 AV:N/AC:M/Au:S/C:P/I:N/A:N
GitHub 3.1 5.3 CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N

Affected packages

ecosystem package affected fixed in
rubygems devise-two-factor
<4.0.2
4.0.2

Affected products

  • Tinfoil devise-two-factor

Classification

Weakness

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.