Vulnerability · Published Sep 17, 2024 · Assigned by SNPS
CVE-2024-8796Insufficient Default OTP Shared Secret Length
Medium 5.3
In plain English
A medium-severity security flaw in devise-two-factor from devise-two-factor. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 51% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | ruby-devise-two-factor | no fix listed | DEBIAN-CVE-2024-8796 |
| RubyGems | devise-two-factor | 6.0.0 | GHSA-qjxf-mc72-wjr2 |
| RubyGems | devise-two-factor | no fix listed | GHSA-qjxf-mc72-wjr2 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| devise-two-factor | devise-two-factor | 4.0.0 – before 6.0.01.0.0 |
Weakness: CWE-331 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N