critical9.8
CVE-2022-32224
Active Record RCE bug with Serialized Columns
Impact
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 | Affected | Fixed in |
|---|---|---|---|
| rubygems | activerecord | >= 7.0.0, <= 7.0.3 | 7.0.3.1 |
Affected products
| Vendor | Product | Affected versions |
|---|---|---|
| Activerecord Project | Activerecord | before 5.2.8.1 from 6.0.0 before 6.0.5.1 from 6.1.0 before 6.1.6.1 from 7.0.0 before 7.0.3.1 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/advisories/GHSA-3hhc-qp5v-9p2j
- https://groups.google.com/g/rubyonrails-security/c/MmFO3LYQE8U
- https://lists.debian.org/debian-lts-announce/2026/05/msg00022.html
- https://nvd.nist.gov/vuln/detail/CVE-2022-32224
- https://github.com/rails/rails/commit/611990f1a6c137c2d56b1ba06b27e5d2434dcd6a
- https://discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activerecord/CVE-2022-32224.yml