CVE-2013-0233: Devise Devise Does Not Properly Perform Vulnerability

MODERATE
Advisory Identifier: GHSA-jxhw-mg8m-2pj8
CWE-704
Published
Advisory Summary

CVE-2013-0233 is a MODERATE devise does not properly perform vulnerability (CWE-704: Incorrect Type Conversion or Cast) affecting Devise libraries in the RubyGems ecosystem. The issue involves devise does not properly perform type conversion when performing database queries. Remediation is available by upgrading affected packages to version 2.2.3, 2.1.3, 2.0.5, 1.5.4.

CVE-2013-0233 at a Glance

CVE Identifier CVE-2013-0233
GHSA Identifier GHSA-jxhw-mg8m-2pj8
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-704: Incorrect Type Conversion or Cast
Affected Product Devise
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2013-0233

To remediate this vulnerability, upgrade all affected Devise dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

devise fixed: 2.2.3
Upgrade devise to 2.2.3
devise fixed: 2.1.3
Upgrade devise to 2.1.3
devise fixed: 2.0.5
Upgrade devise to 2.0.5
devise fixed: 1.5.4
Upgrade devise to 1.5.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for devise

How to Check if You Are Affected

To determine whether your application is affected by CVE-2013-0233, inspect your project dependencies for Devise:

inspect dependencies for devise

Analyze the terminal output to locate any version of Devise in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-704: Incorrect Type Conversion or Cast, where the product does not correctly convert an object, resource, or structure from one type to a different type. In Devise, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2013-0233 Affected Devise Versions

4 component(s)
Fixed Versions:
2.2.32.1.32.0.51.5.4
Product / Package Ecosystem Affected Versions Fixed Version
devise
RubyGems
≥ 2.2.0
< 2.2.3
2.2.3
devise
RubyGems
≥ 2.1.0
< 2.1.3
2.1.3
devise
RubyGems
≥ 2.0.0
< 2.0.5
2.0.5
devise
RubyGems
≥ 1.5.0
< 1.5.4
1.5.4

References

Frequently Asked Questions

What is CVE-2013-0233?
CVE-2013-0233 is a security vulnerability in Devise involving Devise does not properly perform type conversion when performing database queries under CWE-704: Incorrect Type Conversion or Cast.
Which Devise versions are affected?
Affected versions include releases prior to 2.2.3, 2.1.3, 2.0.5, 1.5.4 across affected packages: devise.
What version fixes CVE-2013-0233?
Upgrading to 2.2.3, 2.1.3, 2.0.5, 1.5.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is devise affected?
Yes, devise is affected in releases prior to 2.2.3, 2.1.3, 2.0.5, 1.5.4. Upgrade your dependency to 2.2.3, 2.1.3, 2.0.5, 1.5.4 or later.
What CWE is associated with CVE-2013-0233?
CVE-2013-0233 is classified under CWE-704: Incorrect Type Conversion or Cast (The product does not correctly convert an object, resource, or structure from one type to a different type.).
How can I check RubyGems dependencies for CVE-2013-0233?
Run the dependency tree command: 'inspect dependencies for devise'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jxhw-mg8m-2pj8",
  "modified" : "2023-01-23T21:20:12Z",
  "published" : "2017-10-24T18:33:37Z",
  "aliases" : [ "CVE-2013-0233" ],
  "summary" : "Devise does not properly perform type conversion when performing database queries",
  "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.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "devise"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.0"
      }, {
        "fixed" : "2.2.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "devise"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0"
      }, {
        "fixed" : "2.1.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "devise"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "devise"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.5.0"
      }, {
        "fixed" : "1.5.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-0233"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Snorby/snorby/issues/261"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20140726005251/http://www.phenoelit.org/blog/archives/2013/02/05/mysql_madness_and_rails/index.html"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200229103406/http://www.securityfocus.com/bid/57577"
  }, {
    "type" : "WEB",
    "url" : "http://blog.plataformatec.com.br/2013/01/security-announcement-devise-v2-2-3-v2-1-3-v2-0-5-and-v1-5-3-released"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2013-03/msg00000.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.metasploit.com/modules/auxiliary/admin/http/rails_devise_pass_reset"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2013/01/29/3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-704" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:44:21Z",
    "nvd_published_at" : null
  }
}