Description
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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 12 | ruby-devise | 3.4.1-1 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Ruby on Rails Devise Authentication Password Reset
auxiliary/admin/http/rails_devise_pass_reset
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| RubyGems | devise | >= 2.2.0, < 2.2.3 | 2.2.3 | GHSA-jxhw-mg8m-2pj8 |
| RubyGems | devise | >= 2.1.0, < 2.1.3 | 2.1.3 | GHSA-jxhw-mg8m-2pj8 |
| RubyGems | devise | >= 2.0.0, < 2.0.5 | 2.0.5 | GHSA-jxhw-mg8m-2pj8 |
| RubyGems | devise | >= 1.5.0, < 1.5.4 | 1.5.4 | GHSA-jxhw-mg8m-2pj8 |
References
- http://www.metasploit.com/modules/auxiliary/admin/http/rails_devise_pass_reset
- [oss-security] 20130128 Re: CVE request for 'devise' ruby gem mailing-list
- http://www.phenoelit.org/blog/archives/2013/02/05/mysql_madness_and_rails/index.html
- openSUSE-SU-2013:0374 vendor-advisory
- 57577 vdb-entry
- http://blog.plataformatec.com.br/2013/01/security-announcement-devise-v2-2-3-v2-1-3-v2-0-5-and-v1-5-3-released/
- https://github.com/Snorby/snorby/issues/261