CVE-2013-0333 activesupport in Rails vulnerable to incorrect data conversion
Remote attackers can execute arbitrary code, perform SQL injection, or bypass authentication in Ruby on Rails via unsafe YAML deserialization of JSON data.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2013-0333?
CVE-2013-0333 is a high-severity unsafe deserialization vulnerability in Rubyonrails Rails, published on 30 Jan 2013. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Which versions are affected by CVE-2013-0333?
4 open source packages ship an affected version, including activesupport. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
activesupport RubyGems | From 2.3.2 | 2.3.16 |
activesupport RubyGems | From 2.3.2 | 2.3.16 |
activesupport RubyGems | From 3.0.0 | 3.0.20 |
activesupport RubyGems | From 3.0.0 | 3.0.20 |
Linux distribution packages (1)
rubygem-activesupport Red Hat:openshift:1::el6 | All versions | 1:3.0.13-4.el6op |
Products include Rubyonrails Rails, Rubyonrails Ruby on Rails.
How do I fix CVE-2013-0333?
Upgrade activesupport to a fixed version for your release line: 2.3.16 or 3.0.20.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2013-0333 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2013-0333 exists.
Public exploit code: 2 Metasploit modules, 1 Exploit-DB entry and 1 proofs of concept on GitHub.
Other vulnerabilities in Rubyonrails Rails
- CVE-2013-0277 Active Record contains deserialization of arbitrary YAML
- CVE-2017-17916 SQL injection in n/a
- CVE-2017-17917 SQL injection in n/a
- CVE-2026-33195 Rails Active Storage has possible Path Traversal in DiskService
- CVE-2024-26142 Rails possible ReDoS vulnerability in Accept header parsing in Action Dispatch
Sources
Also known as DEBIAN-CVE-2013-0333, DSA-2613-1, GHSA-xgr2-v94m-rc9g, RHSA-2013:0202.