Devise does not properly perform type conversion when performing database queries
Published 24 Oct 2017 · Updated 3 Dec 2024
Is your project on an affected devise?
Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=2.2.0 <2.2.3
- Fixed in
- 2.2.3
bundle update --conservative devise # Gemfile: '>= 2.2.3'- Affected
- >=2.1.0 <2.1.3
- Fixed in
- 2.1.3
bundle update --conservative devise # Gemfile: '>= 2.1.3'- Affected
- >=2.0.0 <2.0.5
- Fixed in
- 2.0.5
bundle update --conservative devise # Gemfile: '>= 2.0.5'- Affected
- >=1.5.0 <1.5.4
- Fixed in
- 1.5.4
bundle update --conservative devise # Gemfile: '>= 1.5.4'Details
Devise gem 2.2.x before 2.2.3, 2.1.x before 2.1.3, 2.0.x before 2.0.5, and 1.5.x before 1.5.4 for Ruby, when using certain databases, does not properly perform type conversion when performing database queries, which might allow remote attackers to cause incorrect results to be returned and bypass security checks via unknown vectors, as demonstrated by resetting passwords of arbitrary accounts.
Is GHSA-jxhw-mg8m-2pj8 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected devise, and gives you the command that fixes it.
More advisories for devise
- MediumCVE-2026-40295Devise has an Open Redirect via Unvalidated `request.referrer` in Timeoutable Session Timeout Handler · 8 May 2026
- MediumCVE-2026-32700Devise has a confirmable "change email" race condition permits user to confirm email they have no access to · 17 Mar 2026
- HighCVE-2015-8314Devise Gem for Ruby Unauthorized Access Using "Remember Me" Cookie · 26 Jan 2023
- MediumCVE-2019-16109Authentication Bypass in Devise · 11 Sept 2019
- MediumCVE-2019-5421devise Time-of-check Time-of-use Race Condition vulnerability · 19 Mar 2019
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2013-0233
- Linkgithub.com/Snorby/snorby/issues/261
- Linkweb.archive.org/web/20140726005251/http://www.phenoelit.org/blog/archives/2013/02/05/mysql_madness_and_rails/index.html
- Linkweb.archive.org/web/20200229103406/http://www.securityfocus.com/bid/57577
- Linkblog.plataformatec.com.br/2013/01/security-announcement-devise-v2-2-3-v2-1-3-v2-0-5-and-v1-5-3-released
- Linklists.opensuse.org/opensuse-updates/2013-03/msg00000.html
- Linkwww.metasploit.com/modules/auxiliary/admin/http/rails_devise_pass_reset
- Linkwww.openwall.com/lists/oss-security/2013/01/29/3
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.