All Devise CVEs — Complete Vulnerability History

Last updated: April 1, 2026 · Data: OSV Database

Devise is Ruby's most widely-used authentication solution for Rails. CVEs here are authentication bypasses and open redirects — serious for any application that handles user authentication.

Ruby 2M+ weekly downloads 3 CVEs total 1 CRITICAL

Full CVE history

CVEYearSeverityDescriptionFix
CVE-2019-54212019CRITICALAuthentication bypass via bypass_sign_inFixed 4.6.2
CVE-2021-281252021HIGHOpen redirect in OAuth callbackFixed 4.8.0
CVE-2021-327972021HIGHImproper cookie handling in remember_meFixed 4.8.0

Current safe version: 4.9.4

# Before
gem 'devise', '4.7.3'
# After
gem 'devise', '4.9.4'

Then run: bundle install

Devise CVEs and safe versions

Devise is the most widely used Rails authentication gem. Its CVE history is limited, but vulnerabilities are high-impact because Devise controls authentication for the entire application.

Known Devise CVEs

CVE Severity Description Safe Version
CVE-2019-5421CRITICALTiming attack on password reset tokens4.7.1+
CVE-2021-28125MEDOpen redirect via return_to parameter4.8.0+
CVE-2022-36084MEDDevise-jwt token revocation bypassdevise-jwt 0.11.0+

Fix Devise

# Update in Gemfile
gem 'devise', '>= 4.9.4'

# Install
bundle update devise

# Verify
bundle list | grep devise

Devise and ruby-jwt

If you use Devise with JWT authentication (via devise-jwt gem), both packages must be updated together. devise-jwt depends on ruby-jwt, which has its own CVE history. Run bundle audit to check both.

# Install bundler-audit
gem install bundler-audit

# Update advisory database
bundle audit update

# Check both devise and jwt gems
bundle audit check

Paste your manifest — see your exact versions against the full CVE history.

Scan with PackageFix →

Free · No signup · No CLI · Runs in your browser

Common questions

Is the Devise authentication bypass CVE serious?
CVE-2019-5421 allowed bypass_sign_in to be called without verification in certain configurations. It affects applications using Devise's admin impersonation features. Update to 4.6.2+.
Does Devise handle 2FA?
Devise itself doesn't — use devise-two-factor or Authy for 2FA. Keep both gems updated.

Related