Ruby on Rails: Remote Code Execution A vulnerability has been discovered in Ruby on Rails, which can lead to remote code execution via serialization of data. rails 2024-08-11 2024-08-11 857840 remote 7.0.3.1 6.1.6.1 7.0.3.1 6.1.6.1

Ruby on Rails is a free web framework used to develop database-driven web applications.

Multiple vulnerabilities have been discovered in Ruby on Rails. Please review the CVE identifiers referenced below for details.

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. Impacted Active Record models will look something like this: class User < ApplicationRecord serialize :options # Vulnerable: Uses YAML for serialization serialize :values, Array # Vulnerable: Uses YAML for serialization serialize :values, JSON # Not vulnerable end The released versions change the default YAML deserializer to use YAML.safe_load, which prevents deserialization of possibly dangerous objects. This may introduce backwards compatibility issues with existing data.

There is no known workaround at this time.

All Ruby on Rails users should upgrade to the latest version:

# emerge --sync # emerge --ask --oneshot --verbose ">=dev-ruby/rails-6.1.6.1:6.1" # emerge --ask --oneshot --verbose ">=dev-ruby/rails-7.0.3.1:7.0"
CVE-2022-32224 graaff graaff