CVE-2024-8796
Insufficient Default OTP Shared Secret Length
Reported by snps · Published September 17, 2024
devise-two-factor is fixed in 6.0.0 (RubyGems)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| devise-two-factor | RubyGems | 6.0.0 |
| devise-two-factor | tinfoilsecurity | 6.0.0 |
| devise-two-factor | devise-two-factor | 6.0.0 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| devise-two-factor | devise-two-factor | 4.0.0, 1.0.0 |
| RubyGems | devise-two-factor | 4.0.0, 1.0.0 |
| devise-two-factor | devise-two-factor | 4.0.0, 1.0.0 |
Timeline
- Sep 17, 2024 CVE Published
- Sep 17, 2024 PoC Published
- Sep 18, 2024 EPSS Score (30 in total, the first dated here)
- Sep 20, 2024 CVE Updated
- Oct 5, 2024 Coalition ESS Score (6 in total, the first dated here)
- Mar 17, 2026 Security Advisory
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-8796
vulnetix vdb fixes CVE-2024-8796
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-8796/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart