{"id":"CVE-2021-43177","aliases":["GHSA-jm35-h8q2-73mp"],"url":"https://o3.security/vulnerability/CVE-2021-43177","summary":"Improper one time password handling in devise-two-factor","details":"### Impact\nAs 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.\n \n### Patches\nThis 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.\n\n### Credit for discovery\nBenoit Côté-Jodoin\nMichael Nipper - https://github.com/tinfoil/devise-two-factor/issues/106","published":"2022-04-11T20:15:16.037Z","modified":"2026-08-27T08:40:55.384753Z","cvss":{"score":5.3,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N"},"epss":{"score":0.00881,"percentile":0.57416,"asOf":"2026-09-17"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"RubyGems","name":"devise-two-factor","fixedVersion":"4.0.2"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://github.com/tinfoil/devise-two-factor/security/advisories/GHSA-jm35-h8q2-73mp"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43177"},{"type":"WEB","url":"https://github.com/tinfoil/devise-two-factor/issues/106"},{"type":"WEB","url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/devise-two-factor/CVE-2021-43177.yml"},{"type":"PACKAGE","url":"https://github.com/tinfoil/devise-two-factor"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-27T08:40:55.384753Z"}}