CVE-2026-32700: Devise has a confirmable "change email" race condition that permits user to confirm email they have no access to
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)
ruby class User < ApplicationRecord protected
def postponeemailchangeuntilconfirmationandregenerateconfirmationtoken unconfirmedemailwillchange! super end end
Note: Mongoid does not seem to respect that willchange! should force the attribute to be persisted, even if it did not really change, so you might have to implement a workaround similar to Devise by setting changedattributes["unconfirmedemail"] = nil as well.
Other sources
Devise is an authentication solution for Rails based on Warden. Prior to version 5.0.3, 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. This is patched in Devise v5.0.3. Users should upgrade as soon as possible. As a workaround, applications can override a specific method from Devise models to force unconfirmedemail to be persisted when unchanged. Note that Mongoid does not seem to respect that willchange! should force the attribute to be persisted, even if it did not really change, so the user might have to implement a workaround similar to Devise by setting changedattributes["unconfirmedemail"] = nil as well.
— MITRE
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2026-32700?
The severity of CVE-2026-32700 is considered high due to its ability to allow an attacker to confirm an email address they do not own.
How do I fix CVE-2026-32700?
To fix CVE-2026-32700, upgrade the Devise gem to version 5.0.3 or later.
What causes the vulnerability in CVE-2026-32700?
CVE-2026-32700 is caused by a race condition in the Confirmable module of Devise that affects email confirmation.
Who is affected by CVE-2026-32700?
Any application using versions of the Devise gem prior to 5.0.3 with the `reconfirmable` option enabled is affected by CVE-2026-32700.
What is the impact of exploiting CVE-2026-32700?
Exploiting CVE-2026-32700 allows an attacker to confirm an email address they do not control, potentially leading to unauthorized access.