Loading...
Skip to main content

CVE-2013-3221 — Active Record component in activerecord — CVE Details

CRITICAL

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

Published May 14, 2022Updated February 3, 2026Source: osv

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.

Advisory Timeline

  • First published May 14, 2022 (1612 days ago).
  • Last revised February 3, 2026 — 1362 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update activerecord to 4.2.0 or later
gem install activerecord -v 4.2.0

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
activerecord
rubygems
1.0.0, 1.1.0, 1.10.0, 1.10.1 (+251 more)4.2.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-20
    Improper Input ValidationMITRE
  • CWE-89
    SQL InjectionMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

Frequently Asked Questions

What is CVE-2013-3221?
Active Record component in Ruby on Rails has a data-type injection vulnerability This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.1/10).
How do I check if my project is affected by CVE-2013-3221?
CVE-2013-3221 affects activerecord. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2013-3221 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.1

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-f57c-hx33-hvh8

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies