NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
💎 RubyGems
Not in CISA KEV

CVE-2013-3221 — activerecord

CVE-2013-3221 is a Improper Input Validation vulnerability in activerecord. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for activerecord — see the affected versions and patch details below.

Active Record component in Ruby on Rails has a data-type injection vulnerability

Also known asGHSA-f57c-hx33-hvh8
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
1 known
Exploitation data as of Nov 8, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
2.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs84th percentile — riskier than 84% of all scored CVEsHighest risk
0.00%0.99%1.98%2.98%0.5%2.4%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected
💎activerecord

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.

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 between the "typed XML" feature and a MySQL database.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
💎RubyGemsactiverecordall versions4.2.0bundle update activerecord --conservative

Affected Products

2 products · 104 configurations
Application
railsrubyonrails
56 versions
2.3.02.3.12.3.22.3.32.3.42.3.92.3.102.3.112.3.122.3.132.3.142.3.15
Application
ruby on railsrubyonrails
1 version
3.0.4
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for activerecord, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update activerecord to 4.2.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2013-3221 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2013-3221 in your dependencies?

Find it across RubyGems, including transitive dependencies.

CVE-2013-3221: activerecord — Fixed in 4.2.0