Insufficient Default OTP Shared Secret Length
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2024-8796
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 05:41 UTC · Revision 1
Source evidence
Insufficient Default OTP Shared Secret Length
core-osv · Original sourcePublished 17 Sept 2024, 17:12 UTC
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.
osv:CVE-2024-8796
Complete source record
{
"id": "0cb31105788c977b3dfe5619c0bc3082d77742ed6b50349812fc1b9302b33e12",
"url": "https://osv.dev/vulnerability/CVE-2024-8796",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Insufficient Default OTP Shared Secret Length",
"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.",
"evidence": "osv:CVE-2024-8796",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2024-8796",
"aliases": [
"CVE-2024-8796",
"GHSA-qjxf-mc72-wjr2"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "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"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/devise-two-factor/devise-two-factor",
"type": "GIT",
"events": [
{
"introduced": "267c14d25b03c112f7f1853e4fa0732ed905314b"
},
{
"fixed": "cc6f34423d9c6af9f3e02be478c3c40dc7462e19"
},
{
"introduced": "5819f75b5a10d04c08cc6f4098263d5331aa1e76"
},
{
"last_affected": "5819f75b5a10d04c08cc6f4098263d5331aa1e76"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:tinfoilsecurity:devise-two-factor:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "4.0.0"
},
{
"fixed": "6.0.0"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:tinfoilsecurity:devise-two-factor:1.0.0:*:*:*:*:*:*:*",
"range": [
{
"introduced": "1.0.0"
},
{
"last_affected": "1.0.0"
}
],
"source": "CPE_STRING"
}
]
}
}
],
"versions": [
"1.0.0",
"v5.1.0",
"v4.0.2",
"v5.0.0",
"v4.0.1",
"v4.0.0",
"v1.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-8796.json"
}
}
],
"modified": "2026-10-28T02:30:43.005890319Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/8xxx/CVE-2024-8796.json",
"https://github.com/devise-two-factor/devise-two-factor/security/advisories/GHSA-qjxf-mc72-wjr2",
"https://nvd.nist.gov/vuln/detail/CVE-2024-8796"
],
"provider_metadata": {
"cwe_ids": [
"CWE-331"
],
"cna_assigner": "SNPS",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/8xxx/CVE-2024-8796.json"
}
},
"related_cves": [
{
"value": "CVE-2024-8796",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 510781,
"published_at": "2024-09-17T17:12:13.468+00:00"
}