On this page

Atomicorp WAF Research Note: CVE-2026-40295

Devise: Open Redirect via Unvalidated request.referrer in Timeoutable Session Timeout Handler

CVE Details

Status: Attack Blocked by Atomicorp
  • Already protected by existing Atomicorp WAF rules
  • Protection status: Understanding Atomicorp WAF Protection Status
  • CVE: CVE-2026-40295
  • Name: Devise: Open Redirect via Unvalidated request.referrer in Timeoutable Session Timeout Handler
  • Severity: Medium
  • CVSS: 6.1 (v3.1) (Medium)
  • CVSS version: 3.1
  • CVSS source: GitHub_M CNA
  • CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    • Attack vector: Network
    • Attack complexity: Low
    • Privileges required: None
    • User interaction: Required
    • Scope: Changed
    • Confidentiality impact: Low
    • Integrity impact: Low
    • Availability impact: None
  • CWE: CWE-601 — URL Redirection to Untrusted Site (‘Open Redirect’)
  • Related CAPEC attack patterns (via MITRE CWE relationships): CAPEC-178 (opens in a new tab)
  • Vendor: heartcombo
  • Vulnerable product: devise
  • CVE published: 2026-05-22
  • CVE last modified: 2026-07-23
  • Affected versions (NVD configurations):
    • devise: < 5.0.4
  • EPSS: 0.0024; 15.2th percentile (FIRST (opens in a new tab) )
  • Latest Update: 2026-09-06
  • Selected Rule IDs observed: 344365
  • Matching rules: 1; rules with blocking actions: 1
  • Would-block Rule IDs: 344365
  • Request surfaces inspected: JSON request data, Request URI, Request argument names, Request arguments, Request headers, SOAP request data
Technical CPE data

This section lists vulnerable CPE matches retained from the NVD configurations. It supplements the readable affected-product information above.

  • cpe:2.3:a:heartcombo:devise:*:*:*:*:*:ruby:*:*
    • Version end (exclusive): 5.0.4
    • NVD match criteria ID: 105ECF82-E1F4-4316-A43F-E6AD3A377191

Vulnerability Description

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 Devise session to be redirected to an arbitrary external URL. This contrasts with the GET timeout path (which uses server-side attempted_path) and Devise’s own store_location_for mechanism (which strips external hosts via extract_path_from_location), both of which are protected; only the non-GET timeout redirect path is unprotected. Expired-session users can be silently redirected from the trusted app domain to attacker-controlled URLs, enabling phishing and malware delivery while bypassing browser warnings. Note: Rails’ built-in open-redirect protection does not mitigate this issue. Devise::FailureApp is an ActionController::Metal app with its own isolated copy of the relevant redirect configuration, so config.action_controller.action_on_open_redirect = :raise (and the older raise_on_open_redirects setting) do not reach it. This issue has been fixed in version 5.0.4.

  1. Maintain the observed Atomicorp protections. Keep your Atomicorp commercial rules current and confirm that the selected observed rules (344365 ) have not been locally disabled. Atomicorp commercial rules are enabled by default. If you use Atomic WAF, review the applicable policy and rule settings.

  2. Apply the vendor’s remediation. WAF protection is defense in depth and does not replace upgrading or following the affected vendor’s guidance.

  3. Validate after changes. Confirm rule updates are current, review WAF events for the affected application, and test application behavior after vendor upgrades, mitigations, or local policy changes.

Research Notes

Atomicorp WAF protections are designed around attack techniques and exploit behaviors, allowing existing protections to apply across multiple vulnerabilities without requiring a unique rule for every CVE.

Public Vulnerability References

Test or Research Source

  • Source: Atomicorp AI Research Framework
  • Tags: cve, derived, redirect, waf-probe

Research Note Context

This research note documents exploit-technique analysis associated with this vulnerability and references Atomicorp WAF protections observed during engineering review, testing, or validation activities.

Atomicorp security controls are generally designed to identify and mitigate attack techniques and exploit behaviors rather than individual CVE identifiers. As a result, protections developed for one vulnerability may also apply to related attack variants and future vulnerabilities using similar techniques.

Learn More

Atomicorp develops commercially supported security technologies for web applications, servers, endpoints, workloads, and legacy enterprise platforms.

Organizations interested in protecting systems against exploit techniques associated with vulnerabilities such as this one can learn more about:

  • Atomic ModSecurity Rules: commercially maintained WAF rules for ModSecurity deployments, including protections for web attacks, bots, scanners, malware, exploitation attempts, and emerging vulnerability classes.
  • Atomic WAF: an enterprise web application firewall with Atomicorp rules, centralized management, reporting, authentication controls, and operational tooling.
  • Atomic ModSecurity Integrator: a special licensing option for MSPs, MSSPs, OEMs, VARs, reverse proxy providers, and other integrators who want to incorporate Atomicorp ModSecurity rule technology into their own products or services.
  • Atomic OSSEC: an enterprise OSSEC-based intrusion detection, compliance, and security monitoring platform.
  • Atomic Protector: workload protection for Linux, web, cloud, data center, and hybrid environments.

For additional information, product evaluations, or technical discussions, visit https://www.atomicorp.com/ or https://modsecurity.io/ (opens in a new tab) .