CVE-2022-32224 is a critical-severity (CVSS 9.8) Deserialization of Untrusted Data vulnerability in activerecord. 2 public exploit or proof-of-concept references are indexed, so weaponization risk is real. A fix is available for activerecord — see the affected versions and patch details below.
Active Record RCE bug with Serialized Columns
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for CVE-2022-32224.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
activerecord💎activerecord💎activerecord💎activerecordReal-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
When serialized columns that use YAML (the default) are deserialized, Rails uses YAML.unsafe_load to convert the YAML data in to Ruby objects. If an attacker can manipulate data in the database (via means like SQL injection), then it may be possible for the attacker to escalate to an RCE.
There are no feasible workarounds for this issue, but other coders (such as JSON) are not impacted.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | activerecord | ≥ 7.0.0&&< 7.0.3.1 | 7.0.3.1bundle update activerecord --conservative |
| 💎RubyGems | activerecord | ≥ 6.1.0&&< 6.1.6.1 | 6.1.6.1bundle update activerecord --conservative |
| 💎RubyGems | activerecord | ≥ 6.0.0&&< 6.0.5.1 | 6.0.5.1bundle update activerecord --conservative |
| 💎RubyGems | activerecord | all versions | 5.2.8.1bundle update activerecord --conservative |
Affected Products
activerecordactiverecord_projectResearch 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 dependencyDetect
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.
Fix
Update activerecord to 7.0.3.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-32224 is resolved across your whole dependency graph.
Workarounds
Until you can upgrade, make sure every query built from user input uses parameterised statements or a prepared-statement API rather than string concatenation, and reduce the database account's privileges so an injected query cannot read or alter data beyond what the feature needs.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for CVE-2022-32224 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Satellite 6.11 for RHEL 7 | tfm-rubygem-activerecord-0:6.0.6-2.el7sat | RHSA-2023:1151 |
| Red Hat Satellite 6.12 for RHEL 8 | tfm-rubygem-activerecord-0:6.0.6-2.el8sat | RHSA-2023:0261 |
| Red Hat Satellite 6.13 for RHEL 8 | tfm-rubygem-activerecord-0:6.1.7-1.el8sat | RHSA-2023:2097 |
Frequently Asked Questions
Is CVE-2022-32224 in your dependencies?
Find it across RubyGems, including transitive dependencies.