Skip to content

← Public intelligence

RubyGems package

devise

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

6 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 6.1RubyGemsPublished

    Devise has an Open Redirect via Unvalidated request.referrer in Timeoutable Session Timeout Handler

    CVE-2026-40295 · GHSA-jp94-3292-c3xv

    Affected
    • RubyGems devise <= 5.0.3
    Fixed in
    5.0.4· Vendor fix available
    Issue
    When the Timeoutable module is enabled in Devise, the FailureApp#redirecturl method returns request.referrer — the HTTP Referer header, which is attacker-controllable — without validation for any non-GET request that results in a session timeout. An attacker who hosts a page with an auto-submitting cross-origin form can cause a victim with an expired Devise session to be redirected to an arbitrary external URL. This contrasts with the GET timeout path (which uses server-side attemptedpath) and Devise's own storelocationfor mechanism (which strips external hosts via extractpathfromlocation), both of which are protected; only the non-GET timeout redirect path is unprotected. Details The vulnerable code is in lib/devise/failureapp.rb: This is passed directly to redirectto: The GET timeout path uses attemptedpath, which is set server-side by Warden and cannot be influenced by the client. The storelocation! method also only runs for GET requests, so no session-based protection is…

    Recommended action: Upgrade to 5.0.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. Medium, CVSS 6.0RubyGemsPublished

    Devise has a confirmable "change email" race condition permits user to confirm email they have no access to

    CVE-2026-32700 · GHSA-57hq-95w6-v4fc

    Affected
    • RubyGems devise <= 5.0.2
    Fixed in
    5.0.3· Vendor fix available
    Issue
    Impact A race condition in Devise's Confirmable module allows an attacker to confirm an email address they do not own. This affects any Devise application using the reconfirmable option (the default when using Confirmable with email changes). By sending two concurrent email change requests, an attacker can desynchronize the confirmationtoken and unconfirmedemail fields. The confirmation token is sent to an email the attacker controls, but the unconfirmedemail in the database points to a victim's email address. When the attacker uses the token, the victim's email is confirmed on the attacker's account. Patches This is patched in Devise v5.0.3. Users should upgrade as soon as possible. Workarounds Applications can override this specific method from Devise models to force unconfirmedemail to be persisted when unchanged: (assuming your model is User) Note: Mongoid does not seem to respect that willchange! should force the attribute to be persisted, even if it did not really change, so…

    Recommended action: Upgrade to 5.0.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  3. High, CVSS 7.5RubyGemsPublished

    Devise Gem for Ruby Unauthorized Access Using "Remember Me" Cookie

    CVE-2015-8314 · GHSA-746g-3gfp-hfhw

    Affected
    • RubyGems devise < 3.5.4
    Fixed in
    3.5.4· Vendor fix available
    Issue
    Devise version before 3.5.4 uses cookies to implement a "Remember me" functionality. However, it generates the same cookie for all devices. If an attacker manages to steal a remember me cookie and the user does not change the password frequently, the cookie can be used to gain access to the application indefinitely.

    Recommended action: Upgrade to 3.5.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  4. Medium, CVSS 5.3RubyGemsPublished

    Authentication Bypass in Devise

    CVE-2019-16109 · GHSA-fcjw-8rhj-gwwc

    Affected
    • RubyGems devise < 4.7.1
    Fixed in
    4.7.1· Vendor fix available
    Issue
    An issue was discovered in Plataformatec Devise before 4.7.1. It confirms accounts upon receiving a request with a blank confirmationtoken, if a database record has a blank value in the confirmationtoken column. (However, there is no scenario within Devise itself in which such database records would exist.)

    Recommended action: Upgrade to 4.7.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  5. UnratedRubyGemsPublished

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

    CVE-2019-5421 · GHSA-73rf-6mrf-759q

    Affected
    • RubyGems devise < 4.6.0
    Fixed in
    4.6.0· Vendor fix available
    Issue
    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 incrementfailedattempts within the Devise::Models::Lockable class not being concurrency safe.

    Recommended action: Upgrade to 4.6.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  6. UnratedRubyGemsPublished

    Devise does not properly perform type conversion when performing database queries

    CVE-2013-0233 · GHSA-jxhw-mg8m-2pj8

    Affected
    • RubyGems devise >= 2.2.0, < 2.2.3; >= 2.1.0, < 2.1.3; >= 2.0.0, < 2.0.5; >= 1.5.0, < 1.5.4
    Fixed in
    2.1.31.5.42.2.32.0.5· Vendor fix available
    Issue
    Devise gem 2.2.x before 2.2.3, 2.1.x before 2.1.3, 2.0.x before 2.0.5, and 1.5.x before 1.5.4 for Ruby, when using certain databases, does not properly perform type conversion when performing database queries, which might allow remote attackers to cause incorrect results to be returned and bypass security checks via unknown vectors, as demonstrated by resetting passwords of arbitrary accounts.

    Recommended action: Upgrade to 2.2.3, 2.1.3, 2.0.5 or 1.5.4 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →