CVE-2026-32700: Devise Email Change Race Condition Vulnerability

devise Updated 17 Mar 2026

Summary

17/03/2026
Yes i
Moderate
6.0

CVE-2026-32700: Impact A race condition in Devise's Confirmable module allows an attacker to confirm an email address they do not own. Affects devise versions < 5.0.3. Fixed in 5.0.3. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Devise is a flexible authentication solution for Rails based on Warden. It provides a range of features including user registration, password recovery, and email confirmation. One of its key modules, Confirmable, is designed to ensure that users confirm their email addresses. However, a flaw in the Confirmable module allows for a race condition when changing email addresses, particularly when the reconfirmable option is enabled, which is the default behavior.

Vulnerability Detail

A race condition in Devise's Confirmable module allows an attacker to confirm an email address they do not own. This vulnerability arises when an attacker sends two concurrent email change requests. This can lead to a desynchronization of the confirmation_token and unconfirmed_email fields in the database. The attacker controls the confirmation token sent to their email, while the unconfirmed_email field points to the victim's email. When the attacker uses the token, the victim's email is confirmed on the attacker's account, leading to unauthorized access.

How To Fix

Latest published version: 5.0.4 as of 22 Oct 2026

gem install devise -v 5.0.4

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.0.3

This is the first release that contains the fix.

gem install devise -v 5.0.3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading is not immediately possible, you can implement a workaround by overriding a specific method in your Devise model. For example, if your model is User, you can add the following code:

class User < ApplicationRecord
  protected

  def postpone_email_change_until_confirmation_and_regenerate_confirmation_token
    unconfirmed_email_will_change!
    super
  end
end

Note: If you are using Mongoid, you may need to implement an additional workaround to ensure that the unconfirmed_email attribute is persisted correctly.

Conclusion

The CVE-2026-32700 vulnerability in Devise poses a significant risk by allowing unauthorized email confirmations through a race condition. It is crucial for users to upgrade to version 5.0.3 or implement the suggested workaround to protect their applications from potential exploitation.

See every vulnerability recorded for devise →

Share this vulnerability

FAQ

The vulnerability is a race condition that allows an attacker to confirm an email address they do not own by exploiting concurrent email change requests.

All versions of Devise prior to 5.0.3 are affected by this vulnerability.

You can use Vulert, which monitors open-source vulnerabilities in your software. You can check your application by using the Vulert playground at Vulert Scanner without needing to sign up.

The CVSS score for this vulnerability is 6.0, indicating a moderate severity level.

If an immediate upgrade is not possible, implement the provided workaround in your Devise model to mitigate the risk until you can upgrade.

Related vulnerabilities

Recent vulnerabilities recorded for devise.

How To Fix

Latest published version: 5.0.4 as of 22 Oct 2026

gem install devise -v 5.0.4

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.0.3

This is the first release that contains the fix.

gem install devise -v 5.0.3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback