activesupport in Rails vulnerable to incorrect data conversionGHSA-xgr2-v94m-rc9g
GHSA-xgr2-v94m-rc9g is a remote code execution vulnerability in activesupport. 3 public exploit references exist, so weaponization risk is real. A fix is available for activesupport — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
activesupport💎activesupportReal-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
lib/active_support/json/backends/yaml.rb in Ruby on Rails 2.3.x before 2.3.16 and 3.0.x before 3.0.20 does not properly convert JSON data to YAML data for processing by a YAML parser, which allows remote attackers to execute arbitrary code, conduct SQL injection attacks, or bypass authentication via crafted data that triggers unsafe decoding, a different vulnerability than CVE-2013-0156.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | activesupport | ≥ 2.3.2&&< 2.3.16 | 2.3.16bundle update activesupport --conservative |
| 💎RubyGems | activesupport | ≥ 3.0.0&&< 3.0.20 | 3.0.20bundle update activesupport --conservative |
Affected Products
railsrubyonrailsruby on railsrubyonrailsResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Ruby on Rails - JSON Processor YAML Deserialization Code Execution (Metasploit)
by Metasploit · Jan 29, 2013
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for activesupport, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update activesupport to 2.3.16 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-xgr2-v94m-rc9g 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.
| Product | Fixed in | Advisory |
|---|---|---|
| CloudForms for RHEL 6 | katello-0:1.1.12.1-1.el6cf | RHSA-2013:0203 |
| Red Hat Subscription Asset Manager 1.1 | rubygem-activesupport-1:3.0.10-7.el6cf | RHSA-2013:0201 |
| RHEL 6 Version of OpenShift Enterprise | rubygem-activesupport-1:3.0.13-4.el6op | RHSA-2013:0202 |
Frequently Asked Questions
Is GHSA-xgr2-v94m-rc9g in your dependencies?
Find it across RubyGems, including transitive dependencies.