GitHub Advisoryadvisory · RubyGems

GHSA-3hhc-qp5v-9p2j Active Record RCE bug with Serialized Columns

CRITICAL Published 2022-07-12 Modified 2026-05-11 Official page ↗
Aliases
CVE-2022-32224
Ecosystem
RubyGems
Packages
activerecord
Severity
Critical
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-502
Reviewed
2022-07-12

Affected packages

• RubyGems activerecord: >= 7.0.0, < 7.0.3.1 → fixed in 7.0.3.1 • RubyGems activerecord: >= 6.1.0, < 6.1.6.1 → fixed in 6.1.6.1 • RubyGems activerecord: >= 6.0.0, < 6.0.5.1 → fixed in 6.0.5.1 • RubyGems activerecord: < 5.2.8.1 → fixed in 5.2.8.1

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.

Related

Alias · CVE (1)

  • CVE-2022-32224 A possible escalation to RCE vulnerability exists when using YAML serialized columns in Active Record < 7.0.3.1, <6.1.6.1, <6.0.5.1 and… vulnerability

Weakness · CWE (1)

  • CWE-502 Deserialization of Untrusted Data weakness

References