# CVE-2013-3221

- Priority: **Prioritise**
- Reason: Public exploit (reference, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2013-04-22 · Modified: 2024-08-06
- Aliases: DEBIAN-CVE-2013-3221, GHSA-f57c-hx33-hvh8
- Record: https://cvemate.com/vulnerability/CVE-2013-3221 · JSON: https://cvemate.com/vulnerability/CVE-2013-3221/json

## Description

```text
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.
```

## Signals

- CVSS: 6.4 medium (v2.0, NVD) AV:N/AC:L/Au:N/C:P/I:P/A:N
- EPSS: 2.4%, percentile 84.577%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (reference)

## Affected

- debian rails (Debian): \< 2.3.14.1
- RubyGems activerecord (RubyGems): \< 4.2.0
- rubyonrails rails: 2.3.0 \| 2.3.1 \| 2.3.2 \| 2.3.3 \| 2.3.4 \| 2.3.9 \| 2.3.10 \| 2.3.11 \| 2.3.12 \| 2.3.13 \| 2.3.14 \| 2.3.15 \| 2.3.16 \| 3.0.0 \| 3.0.0:beta \| 3.0.0:beta2 \| 3.0.0:beta3 \| 3.0.0:beta4 \| 3.0.0:rc \| 3.0.0:rc2 \| 3.0.1 \| 3.0.1:pre \| 3.0.2 \| 3.0.2:pre \| 3.0.3 \| 3.0.4:rc1 \| 3.0.5 \| 3.0.5:rc1 \| 3.0.6 \| 3.0.6:rc1 \| 3.0.6:rc2 \| 3.0.7 \| 3.0.7:rc1 \| 3.0.7:rc2 \| 3.0.8 \| 3.0.8:rc1 \| 3.0.8:rc2 \| 3.0.8:rc3 \| 3.0.8:rc4 \| 3.0.9 \| 3.0.9:rc1 \| 3.0.9:rc2 \| 3.0.9:rc3 \| 3.0.9:rc4 \| 3.0.9:rc5 \| 3.0.10 \| 3.0.10:rc1 \| 3.0.11 \| 3.0.12 \| 3.0.12:rc1 \| 3.0.13 \| 3.0.13:rc1 \| 3.0.14 \| 3.0.16 \| 3.0.17 \| 3.0.18 \| 3.0.19 \| 3.0.20 \| 3.1.0 \| 3.1.0:beta1 \| 3.1.0:rc1 \| 3.1.0:rc2 \| 3.1.0:rc3 \| 3.1.0:rc4 \| 3.1.0:rc5 \| 3.1.0:rc6 \| 3.1.0:rc7 \| 3.1.0:rc8 \| 3.1.1 \| 3.1.1:rc1 \| 3.1.1:rc2 \| 3.1.1:rc3 \| 3.1.2 \| 3.1.2:rc1 \| 3.1.2:rc2 \| 3.1.3 \| 3.1.4 \| 3.1.4:rc1 \| 3.1.5 \| 3.1.5:rc1 \| 3.1.6 \| 3.1.7 \| 3.1.8 \| 3.1.9 \| 3.1.10 \| 3.2.0 \| 3.2.0:rc1 \| 3.2.0:rc2 \| 3.2.1 \| 3.2.2 \| 3.2.2:rc1 \| 3.2.3 \| 3.2.3:rc1 \| 3.2.3:rc2 \| 3.2.4 \| 3.2.4:rc1 \| 3.2.5 \| 3.2.6 \| 3.2.7 \| 3.2.8 \| 3.2.9 \| 3.2.10 \| 3.2.11
- rubyonrails ruby\_on\_rails: 3.0.4

## References

- <http://pl.reddit.com/r/netsec/comments/17yajp/mysql_madness_and_rails/>
- <https://groups.google.com/group/rubyonrails-security/msg/1f3bc0b88a60c1ce?dmode=source&output=gplain>
- <http://www.phenoelit.org/blog/archives/2013/02/index.html>
- <http://openwall.com/lists/oss-security/2013/04/24/7>
- <https://gist.github.com/dakull/5442275>
- <http://openwall.com/lists/oss-security/2013/02/06/7>
- <https://security-tracker.debian.org/tracker/CVE-2013-3221>
- <https://nvd.nist.gov/vuln/detail/CVE-2013-3221>
- <https://github.com/rails/rails>
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activerecord/CVE-2013-3221.yml>
- <https://web.archive.org/web/20130825191249/http://www.phenoelit.org/blog/archives/2013/02/index.html>
- <http://pl.reddit.com/r/netsec/comments/17yajp/mysql_madness_and_rails>

---

Data as of 2026-12-05T07:48:52.100Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
