CVE-2013-3221 json
Active Record component in Ruby on Rails has a data-type injection vulnerability
published 13y ago modified 4mo ago also GHSA-f57c-hx33-hvh8 , EUVD-2013-3159
- cvss
- 6.4
- version 2.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.4%
- EPSS 2.4% chance of exploitation in 30 days, percentile 84%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- rubygems activerecord 4.2.0
- rails Debian 14, Debian 13, Debian 12 2.3.14.1
debian advisories DEBIAN-CVE-2013-3221
Is CVE-2013-3221 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2013-3221 updated cvss 5.0
rubygem-activerecord: Data-type injection attacks due absent database column data type (input vs stored value) check
-
Red Hat OpenShift Enterprise 1 rubygem-activerecord, ruby193-rubygem-activerecord Red Hat Subscription Asset Manager rubygem-activerecordnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
2.40% chance of exploitation in the next 30 days, higher than 84% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- phenoelit.org http://www.phenoelit.org/blog/archives/2013/02/index.html referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 2.0 | 6.4 | AV:N/AC:L/Au:N/C:P/I:P/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | activerecord | <4.2.0 |
4.2.0 |
Classification
- Weakness
- Technology feeds
References
-
phenoelit.org
/blog/archives/2013/02/index.html
exploit
- pl.reddit.com /r/netsec/comments/17yajp/mysql_madness_and_rails/
-
groups.google.com
/group/rubyonrails-security/msg/1f3bc0b88a60c1ce?dmode=source&output=gplain
mailing-list, web
-
openwall.com
/lists/oss-security/2013/04/24/7
mailing-list, web
- gist.github.com /dakull/5442275
-
openwall.com
/lists/oss-security/2013/02/06/7
mailing-list, web
-
nvd.nist.gov
/vuln/detail/CVE-2013-3221
advisory
-
github.com
/rails/rails
package
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/activerecord/CVE-2013-3221.yml
web
-
web.archive.org
/web/20130825191249/http://www.phenoelit.org/blog/archives/2013/02/index.html
web
-
pl.reddit.com
/r/netsec/comments/17yajp/mysql_madness_and_rails
web
Sources
- CVE List CVE-2013-3221
- GitHub Advisory GHSA-f57c-hx33-hvh8
- NVD CVE-2013-3221
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.