{"id":"CVE-2021-43177","aliases":["CVE-2021-43177","GHSA-jm35-h8q2-73mp"],"related":[],"kind":"vulnerability","state":"published","title":"Improper one time password handling in devise-two-factor","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)","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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)","source":"cvelist"},{"lang":"en","text":"### 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","format":"markdown","source":"ghsa"},{"lang":"es","text":"Como resultado de una corrección incompleta de CVE-2015-7225, en las versiones de devise-two-factor anteriores a 4.0.2, es posible reusar una contraseña de un solo uso (OTP) durante un (y solo un) intervalo inmediatamente posterior. Vector CVSS: (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N)","source":"nvd"}],"published":"2022-04-07T22:09:03.000Z","modified":"2026-08-27T03:56:00.293Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:S/C:P/I:N/A:N","score":3.5,"rating":"LOW"}],"cwes":["CWE-254"],"affected":[{"ranges":[{"version":"< 4.0.2","status":"affected"}],"vendor":"Tinfoil","product":"devise-two-factor","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.0.2"}],"ecosystem":"RubyGems","package":"devise-two-factor","purl":"pkg:gem/devise-two-factor","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.0.2"}],"vendor":"tinfoilsecurity","product":"devise-two-factor","cpe":"cpe:2.3:a:tinfoilsecurity:devise-two-factor:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/tinfoil/devise-two-factor/security/advisories/GHSA-jm35-h8q2-73mp","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43177","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/tinfoil/devise-two-factor/issues/106","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/devise-two-factor/CVE-2021-43177.yml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/tinfoil/devise-two-factor","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"SNPS","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-43177","url":"https://www.cve.org/CVERecord?id=CVE-2021-43177","licence":"CVE Terms of Use","modified":"2024-08-04T03:47:13.623Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jm35-h8q2-73mp","url":"https://github.com/advisories/GHSA-jm35-h8q2-73mp","licence":"CC-BY-4.0","modified":"2026-08-27T03:56:00.293Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-43177","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43177","licence":"Public domain","modified":"2026-06-17T04:10:35.417Z"}],"updatedAt":"2026-11-25T22:24:36.864Z","epss":{"score":0.00884,"percentile":0.60283,"date":"2026-12-01T12:00:22.000Z"}}