{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2013-3221","id":"CVE-2013-3221","title":"Active Record component in Ruby on Rails has a data-type injection vulnerability","description":"The Active Record component in Ruby on Rails 2.3.x, 3.0.x, 3.1.x, and 3.2.x does not ensure that the declared data type of a database column is used during comparisons of input values to stored values in that column, which makes it easier for remote attackers to conduct data-type injection attacks against Ruby on Rails applications via a crafted value, as demonstrated by unintended interaction bet","descriptionLong":"The Active Record component in Ruby on Rails 2.3.x, 3.0.x, 3.1.x, and 3.2.x does not ensure that the declared data type of a database column is used during comparisons of input values to stored values in that column, which makes it easier for remote attackers to conduct data-type injection attacks against Ruby on Rails applications via a crafted value, as demonstrated by unintended interaction between the \"typed XML\" feature and a MySQL database.","published":"2013-04-22T01:00:00.000Z","updated":"2026-06-16T23:54:43.367Z","reserved":"2013-04-21T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"mitre","metric":{"version":"2.0","score":6.4,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:N","rating":"medium","source":"NVD"},"metrics":[{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"critical","source":"GitHub"},{"version":"2.0","score":6.4,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:N","rating":"medium","source":"NVD"}],"rating":"medium","products":[],"affectedProducts":[{"vendor":"n/a","product":"n/a","defaultStatus":null,"versions":[{"status":"affected","version":"n/a"}],"platforms":[]}],"packages":[{"ecosystem":"RubyGems","name":"activerecord","purl":"pkg:gem/activerecord","ranges":["<4.2.0"],"fixed":["4.2.0"],"advisory":"GHSA-f57c-hx33-hvh8"}],"cwes":["CWE-20","CWE-89"],"aliases":["GHSA-f57c-hx33-hvh8"],"references":[{"url":"http://pl.reddit.com/r/netsec/comments/17yajp/mysql_madness_and_rails/","tags":["x_refsource_MISC","x_transferred","web"]},{"url":"https://groups.google.com/group/rubyonrails-security/msg/1f3bc0b88a60c1ce?dmode=source&output=gplain","tags":["mailing-list","x_refsource_MLIST","x_transferred","web"]},{"url":"http://www.phenoelit.org/blog/archives/2013/02/index.html","tags":["x_refsource_MISC","x_transferred","Exploit","evidence"]},{"url":"http://openwall.com/lists/oss-security/2013/04/24/7","tags":["mailing-list","x_refsource_MLIST","x_transferred","web"]},{"url":"https://gist.github.com/dakull/5442275","tags":["x_refsource_CONFIRM","x_transferred","web"]},{"url":"http://openwall.com/lists/oss-security/2013/02/06/7","tags":["mailing-list","x_refsource_MLIST","x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2013-3221","tags":["advisory"]},{"url":"https://github.com/rails/rails","tags":["package"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activerecord/CVE-2013-3221.yml","tags":["web"]},{"url":"https://web.archive.org/web/20130825191249/http://www.phenoelit.org/blog/archives/2013/02/index.html","tags":["web"]},{"url":"http://pl.reddit.com/r/netsec/comments/17yajp/mysql_madness_and_rails","tags":["web"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.024,"epssPercentile":0.84359,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2013-3221","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2013-3221","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2013-3221","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-f57c-hx33-hvh8","ok":true,"note":"GHSA-f57c-hx33-hvh8"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2013-3221","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}