Skip to main content
CVE-2024-8796VulnerabilityPublished Updated

Ruby devise two factor: Under the default configuration, Devise-Two-Factor versions >= 2.2.0 & < 6.0.0 generate TOTP

Affects ruby-devise-two-factorSource GCVE Database

0
Compare

Not known to be exploited · CVSS 5.3 Medium · fixed in 3.1.0-2ubuntu0.1~esm1 : update ruby-devise-two-factor when convenient.

Data as of 24 Nov 2026, 19:25 UTC

CVSS 3.1 base score
5.3Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 3.1.0-2ubuntu0.1~esm1, 4.0.0-2ubuntu0.1~esm1
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 17 Sep 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 23 Nov 2026.

What to do

Upgrade the Ubuntu ruby-devise-two-factor to 3.1.0-2ubuntu0.1~esm1 (package) or 4.0.0-2ubuntu0.1~esm1 (package).

Affected software

ProductAffectedFixed in
Ubuntu Pro 22.04 LTSruby-devise-two-factorpkg:deb/ubuntu/ruby-devise-two-factor?arch=source&distro=esm-apps/jammyOther threatsAffected
  • <4.0.0-2ubuntu0.1~esm1
Fixed in
  • 4.0.0-2ubuntu0.1~esm1
Ubuntu Pro 20.04 LTSruby-devise-two-factorpkg:deb/ubuntu/ruby-devise-two-factor?arch=source&distro=esm-apps/focalOther threatsAffected
  • <3.1.0-2ubuntu0.1~esm1
Fixed in
  • 3.1.0-2ubuntu0.1~esm1
Ubuntu 16.04 LTSruby-devise-two-factorpkg:deb/ubuntu/ruby-devise-two-factor?arch=source&distro=xenialOther threatsAffected
  • =1.1.0-1
  • =2.0.0-1
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

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.

References

Community reviews

Loading reviews…