{"cve":"CVE-2024-8796","nvd":{"published":"2024-09-17T18:15:05.443","modified":"2026-06-17T08:23:19.257","status":"Analyzed","description":"Under the default configuration, Devise-Two-Factor versions >= 2.2.0 & < 6.0.0 generate TOTP shared secrets that are 120 bits instead of the 128-bit minimum defined by RFC 4226. Using a shared secret shorter than the minimum to generate a multi-factor authentication code could make it easier for an attacker to guess the shared secret and generate valid TOTP codes.","cvss_v4":{"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":6.0},"cvss_v3":{"version":"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},"cwes":["CWE-331"],"references":["https://github.com/devise-two-factor/devise-two-factor/security/advisories/GHSA-qjxf-mc72-wjr2"],"products":["tinfoilsecurity:devise-two-factor"],"source":"nvd","synced_at":"2026-10-19T21:54:38.012257375+00:00"},"epss":{"cve":"CVE-2024-8796","score":0.00641,"percentile":0.50702,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-qjxf-mc72-wjr2","url":"https://osv.dev/vulnerability/GHSA-qjxf-mc72-wjr2","summary":"Devise-Two-Factor Authentication Uses Insufficient Default OTP Shared Secret Length","modified":"2024-09-20T20:20:41Z","packages":[{"ecosystem":"RubyGems","name":"devise-two-factor","purl":"pkg:gem/devise-two-factor","ranges":[">=4.0.0 <6.0.0"],"fixed":["6.0.0"]},{"ecosystem":"RubyGems","name":"devise-two-factor","purl":"pkg:gem/devise-two-factor","ranges":["1.0.0"],"fixed":[]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}