CVE-2026-40295: Devise is an authentication solution for Rails based on Warden
CVE-2026-40295 is a medium-severity flaw (CVSS 6.1) affecting devise. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
Devise is an authentication solution for Rails based on Warden. In versions 5.0.3 and below, when the Timeoutable module is enabled in Devise, the FailureApp#redirect_url 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 Dev
Why this priority
- No elevated risk signals yet
A fixed release or distro patch exists.
Risk facts
| CVSS score | 6.1 (Medium) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | Required |
| EPSS exploit chance | 0.2% (top 85%) |
| CISA exploited list | No |
| Weakness | CWE-601 |
| Published | 2026-05-22 |
| Last modified | 2026-07-23 |
Last updated 2026-07-23 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2026-40295?
devise: upgrade to 5.0.4. Exact commands for each OS are on this page.
Is CVE-2026-40295 being exploited?
CVE-2026-40295 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2026-40295 affect?
CVE-2026-40295 affects devise. Severity is medium (CVSS 6.1). Devise is an authentication solution for Rails based on Warden. In versions 5.0.3 and below, when the Timeoutable module is enabled in Devise, the FailureApp#redirect_url method returns request.referrer — the HTTP Referer header, which is a
How urgent is CVE-2026-40295?
Priority 25/100. No elevated risk signals yet.