Insufficient Default OTP Shared Secret Length
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- High
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| devise-two-factor | devise-two-factor | 4.0.0 to before 6.0.0; 1.0.0 | 6.0.0 | Patch available | CNA |
| — | devise-two-factor (RubyGems) | 4.0.0 to before 6.0.0 | 6.0.0 | Patch available | GHSA-qjxf-mc72-wjr2 |
| — | devise-two-factor (RubyGems) | — | — | No fix listed | GHSA-qjxf-mc72-wjr2 |
- devise-two-factor Vendordevise-two-factor Affected 4.0.0 to before 6.0.0; 1.0.0 Fixed in 6.0.0 Patch available CNA
- devise-two-factor (RubyGems) Vendor— Affected 4.0.0 to before 6.0.0 Fixed in 6.0.0 Patch available GHSA-qjxf-mc72-wjr2
- devise-two-factor (RubyGems) Vendor— Affected — Fixed in — No fix listed GHSA-qjxf-mc72-wjr2
CPE configurations NVD · 2
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:tinfoilsecurity:devise-two-factor:*:*:*:*:*:*:*:* | 4.0.0 to before 6.0.0 | Vulnerable | Tinfoilsecurity |
| cpe:2.3:a:tinfoilsecurity:devise-two-factor:1.0.0:*:*:*:*:*:*:* | 1.0.0 | Vulnerable | Tinfoilsecurity |
- cpe:2.3:a:tinfoilsecurity:devise-two-factor:*:*:*:*:*:*:*:* Versions 4.0.0 to before 6.0.0 Vulnerable ·Tinfoilsecurity
- cpe:2.3:a:tinfoilsecurity:devise-two-factor:1.0.0:*:*:*:*:*:*:* Versions 1.0.0 Vulnerable ·Tinfoilsecurity
Remediation
- Fix · CNA devise-two-factor (devise-two-factor) Fixed in 6.0.0
- Fix · GHSA-qjxf-mc72-wjr2 devise-two-factor (RubyGems) Fixed in 6.0.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-8796
- 2026-10-03 Alias added: GHSA-qjxf-mc72-wjr2
- 2026-10-21 EPSS moved to the 50th–90th percentile
References
Advisory 2
More Tinfoilsecurity Devise-two-factor vulnerabilities
- TI-2015-05998 Tinfoil Devise-two-factor before 2.0.0 does not strictly follow section 5.2 of RFC 6238… CVSS 3.0MEDIUM 5.3
- TI-2021-19191 As a result of an incomplete fix for CVE-2015-7225, in versions of devise-two-factor… CVSS 3.1MEDIUM 5.3
Sources
- CVE-2024-8796 · CVE Program
- CVE-2024-8796 · NVD
- FIRST EPSS
- GHSA-qjxf-mc72-wjr2 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences