MediumGHSA-73rf-6mrf-759qCVE-2019-5421

devise Time-of-check Time-of-use Race Condition vulnerability

Published 19 Mar 2019 · Updated 30 Nov 2024

Is your project on an affected devise?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

deviseRubyGems
Affected
<4.6.0
Fixed in
4.6.0
Update to the fixed version for your release line, for example:bundle update --conservative devise # Gemfile: '>= 4.6.0'

Details

Devise ruby gem before 4.6.0 when the lockable module is used is vulnerable to a time-of-check time-of-use (TOCTOU) race condition due to increment_failed_attempts within the Devise::Models::Lockable class not being concurrency safe.

Is GHSA-73rf-6mrf-759q in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected devise, and gives you the command that fixes it.

More advisories for devise

  • MediumCVE-2026-40295Devise has an Open Redirect via Unvalidated `request.referrer` in Timeoutable Session Timeout Handler · 8 May 2026
  • MediumCVE-2026-32700Devise has a confirmable "change email" race condition permits user to confirm email they have no access to · 17 Mar 2026
  • HighCVE-2015-8314Devise Gem for Ruby Unauthorized Access Using "Remember Me" Cookie · 26 Jan 2023
  • MediumCVE-2019-16109Authentication Bypass in Devise · 11 Sept 2019
  • MediumCVE-2013-0233Devise does not properly perform type conversion when performing database queries · 24 Oct 2017
devise security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.