Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. activerecord
  4. ›
  5. CVE-2022-32224

CVE-2022-32224: Active Record RCE bug with Serialized Columns

July 12, 2022 (updated May 11, 2026)

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.

References

  • discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017
  • github.com/advisories/GHSA-3hhc-qp5v-9p2j
  • github.com/rails/rails/commit/611990f1a6c137c2d56b1ba06b27e5d2434dcd6a
  • github.com/rails/rails/commits/main/activerecord
  • github.com/rubysec/ruby-advisory-db/blob/master/gems/activerecord/CVE-2022-32224.yml
  • groups.google.com/g/rubyonrails-security/c/MmFO3LYQE8U
  • lists.debian.org/debian-lts-announce/2026/05/msg00022.html
  • nvd.nist.gov/vuln/detail/CVE-2022-32224

Code Behaviors & Features

Detect and mitigate CVE-2022-32224 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 5.2.8.1, all versions starting from 6.0.0 before 6.0.5.1, all versions starting from 6.1.0 before 6.1.6.1, all versions starting from 7.0.0 before 7.0.3.1

Fixed versions

  • 7.0.3.1
  • 6.1.6.1
  • 6.0.5.1
  • 5.2.8.1

Solution

Upgrade to versions 5.2.8.1, 6.0.5.1, 6.1.6.1, 7.0.3.1 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-502: Deserialization of Untrusted Data

Source file

gem/activerecord/CVE-2022-32224.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 12 May 2026 00:22:02 +0000.