CVE-2024-8796
published medium CVSS 4.0 · 6.0Insufficient Default OTP Shared Secret Length
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| devise-two-factor | — | devise-two-factor4.0.0 to < 6.0.0 · 1.0.0 · Other versions: unaffected | Affected | Not stated | SNPS |
| Ubuntu | focal | ruby-devise-two-factor | Advisory build | 3.1.0-2ubuntu0.1~esm1 | USN-7050-1 |
| Ubuntu | jammy | ruby-devise-two-factor | Advisory build | 4.0.0-2ubuntu0.1~esm1 | USN-7050-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 6.0 / 10
- Severity
- medium
- Provider
- SNPS · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 5.3 | medium | SNPS · cna | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N | en: GENERAL |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| devise-two-factor | devise-two-factor | 4.0.0 to < 6.0.0 (affected · custom)1.0.0 (affected · custom)Default: unaffected | SNPS · cna |
Weaknesses
1- CWE-331 CWE-331 Insufficient Entropy
References
1Provider assertions
2SNPS · cna
Insufficient Default OTP Shared Secret Length
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 5832b4e45a23c412591b3ca01088d20531015773db8cb3567fc008c710fd6d66
- Ingested
- 23 Sep 2026, 08:34:23 UTC
- Source record
- Official CVE record