Skip to content

Commit d7270eb

Browse files
1 parent cf46de3 commit d7270eb

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-57hq-95w6-v4fc",
4+
"modified": "2026-03-17T17:24:17Z",
5+
"published": "2026-03-17T17:24:17Z",
6+
"aliases": [
7+
"CVE-2026-32700"
8+
],
9+
"summary": "Devise has a confirmable \"change email\" race condition permits user to confirm email they have no access to",
10+
"details": "### Impact\n\nA 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).\n\nBy 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.\n\n### Patches\n\nThis is patched in Devise **v5.0.3**. Users should upgrade as soon as possible.\n\n### Workarounds\n\nApplications can override this specific method from Devise models to force `unconfirmed_email` to be persisted when unchanged: (assuming your model is `User`)\n\n```ruby\nclass User < ApplicationRecord\n protected\n\n def postpone_email_change_until_confirmation_and_regenerate_confirmation_token\n unconfirmed_email_will_change!\n super\n end\nend\n```\n\nNote: 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.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "RubyGems",
21+
"name": "devise"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "5.0.3"
32+
}
33+
]
34+
}
35+
],
36+
"database_specific": {
37+
"last_known_affected_version_range": "<= 5.0.2"
38+
}
39+
}
40+
],
41+
"references": [
42+
{
43+
"type": "WEB",
44+
"url": "https://github.com/heartcombo/devise/security/advisories/GHSA-57hq-95w6-v4fc"
45+
},
46+
{
47+
"type": "WEB",
48+
"url": "https://github.com/heartcombo/devise/issues/5783"
49+
},
50+
{
51+
"type": "WEB",
52+
"url": "https://github.com/heartcombo/devise/pull/5784"
53+
},
54+
{
55+
"type": "PACKAGE",
56+
"url": "https://github.com/heartcombo/devise"
57+
}
58+
],
59+
"database_specific": {
60+
"cwe_ids": [
61+
"CWE-362"
62+
],
63+
"severity": "MODERATE",
64+
"github_reviewed": true,
65+
"github_reviewed_at": "2026-03-17T17:24:17Z",
66+
"nvd_published_at": null
67+
}
68+
}

0 commit comments

Comments
 (0)