CVE-2026-32700 — Vulnerability in devise — CVE Details
Devise has a confirmable "change email" race condition permits user to confirm email they have no access to
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.38%). Schedule for your next planned update.
Does your project use an affected devise version?
Paste your Gemfile.lock to check it for CVE-2026-32700 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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 confirmation_token and unconfirmed_email fields. The confirmation token is sent to an email the attacker controls, but the unconfirmed_email 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 unconfirmed_email to be persisted when unchanged: (assuming your model is User)
class User < ApplicationRecord
protected
def postpone_email_change_until_confirmation_and_regenerate_confirmation_token
unconfirmed_email_will_change!
super
end
end
Note: Mongoid does not seem to respect that will_change! 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 changed_attributes["unconfirmed_email"] = nil as well.
Advisory Timeline
- First published March 17, 2026 (254 days ago).
- Last revised March 30, 2026 — 13 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install devise -v 5.0.3
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: RubyGems (1).
| Package | Fixed In |
|---|---|
| devise RubyGems · Affected: 0.1.0, 0.1.1, 0.2.0, 0.2.1 (+167 more) | 5.0.3 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-362
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 5.3 score means for each attack dimension.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
References
- https://github.com/heartcombo/devise/security/advisories/GHSA-57hq-95w6-v4fcWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-32700ADVISORY
- https://github.com/heartcombo/devise/issues/5783WEB
- https://github.com/heartcombo/devise/pull/5784WEB
- https://github.com/heartcombo/devisePACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/devise/CVE-2026-32700.ymlWEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/devise/GHSA-57hq-95w6-v4fc.ymlWEB
Frequently Asked Questions
- What is CVE-2026-32700?
- Devise has a confirmable "change email" race condition permits user to confirm email they have no access to. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.3/10).
- How do I check if my project is affected by CVE-2026-32700?
- CVE-2026-32700 affects devise. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-32700 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is a below-median EPSS score — only 24.1% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2015-8314HIGH
Devise Gem for Ruby Unauthorized Access Using "Remember Me" Cookie
- CVE-2026-128084MEDIUM
sqlite3-ruby: Possible SQL query truncation when a string is 4 GiB or larger
- CVE-2026-115472MEDIUM
Doorkeeper: When using public clients, any client can revoke any access token
- CVE-2026-40295MEDIUM
Devise has an Open Redirect via Unvalidated `request.referrer` in Timeoutable Session Timeout Handler