# CVE-2013-0156: actionpack Improper Input Validation vulnerability

> Remote attackers can execute arbitrary code or cause denial of service via unsafe YAML or Symbol deserialization in Ruby on Rails.

- **Severity:** High 7.5 (`AV:N/AC:L/Au:N/C:P/I:P/A:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Jan 2013
- **Updated:** 6 Aug 2024
- **Also known as:** DEBIAN-CVE-2013-0156, DSA-2604-1, GHSA-jmgw-6vjg-jjwg, RHSA-2013:0153, openSUSE-SU-2024:10188-1

## What is CVE-2013-0156?

CVE-2013-0156 is a high-severity unsafe deserialization vulnerability in Debian Debian Linux, published on 13 Jan 2013. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

active_support/core_ext/hash/conversions.rb in Ruby on Rails before 2.3.15, 3.0.x before 3.0.19, 3.1.x before 3.1.10, and 3.2.x before 3.2.11 does not properly restrict casts of string values, which allows remote attackers to conduct object-injection attacks and execute arbitrary code, or cause a denial of service (memory and CPU consumption) involving nested XML entity references, by leveraging Action Pack support for (1) YAML type conversion or (2) Symbol type conversion.

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2013-0156?

8 open source packages ship an affected version, including actionpack. It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `actionpack` | RubyGems | All versions | 2.3.15 |
| `actionpack` | RubyGems | All versions | 2.3.15 |
| `actionpack` | RubyGems | From 3.0.0 | 3.0.19 |
| `actionpack` | RubyGems | From 3.0.0 | 3.0.19 |
| `actionpack` | RubyGems | From 3.1.0 | 3.1.10 |
| `actionpack` | RubyGems | From 3.1.0 | 3.1.10 |
| `actionpack` | RubyGems | From 3.2.0 | 3.2.11 |
| `actionpack` | RubyGems | From 3.2.0 | 3.2.11 |
| `ruby193-rubygem-actionpack` | Red Hat:openshift:1::el6 | All versions | 1:3.2.8-2.el6 |
| `ruby193-rubygem-actionpack-doc` | Red Hat:openshift:1::el6 | All versions | 1:3.2.8-2.el6 |
| `ruby193-rubygem-activesupport` | Red Hat:openshift:1::el6 | All versions | 1:3.2.8-3.el6 |
| `rubygem-actionpack` | Red Hat:openshift:1::el6 | All versions | 1:3.0.13-2.1.el6op |
| `rubygem-activesupport` | Red Hat:openshift:1::el6 | All versions | 1:3.0.13-2.el6op |
| `rubygem-extlib` | openSUSE:Tumbleweed | All versions | 0.9.16-7.4 |

Products: Debian Debian Linux, Rubyonrails Rails, Rubyonrails Ruby on Rails.

## How do I fix CVE-2013-0156?

Upgrade actionpack to a fixed version for your release line: 2.3.15, 3.0.19, 3.1.10 or 3.2.11.

## Is CVE-2013-0156 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2013-0156 exists.

Public exploit code:

- Bootstrapped Rails 3.2.10 to test the remote code exploit CVE-2013-0156 (github_poc): https://github.com/bsodmike/rails-exploit-cve-2013-0156
- Inspect all of your heroku apps to see if they are running a vulnerable version of Rails (github_poc): https://github.com/heroku/heroku-CVE-2013-0156
- Ruby on Rails XML Processor YAML Deserialization Code Execution (metasploit)
- Ruby on Rails - XML Processor YAML Deserialization Code Execution (Metasploit) (exploitdb)
- Silly Rails App to demonstrate vuln CVE-2013-0156 (github_poc): https://github.com/terracatta/name_reverser
- crack repo from jnunemaker but with version 0.1.8 and rails CVE-2013-0156 vulnerability fixed (github_poc): https://github.com/josal/crack-0.1.8-fixed

## Other vulnerabilities in Debian Debian Linux

- [CVE-2015-3306](https://insights.sbomify.com/CVE-2015-3306/): ProFTPD Improper Access Control (critical 10.0, exploited in the wild)
- [CVE-2025-49113](https://insights.sbomify.com/CVE-2025-49113/): RoundCube Webmail Deserialization of Untrusted Data (critical 9.9, exploited in the wild)
- [CVE-2026-24061](https://insights.sbomify.com/CVE-2026-24061/): GNU InetUtils Argument Injection (critical 9.8, exploited in the wild)
- [CVE-2025-39682](https://insights.sbomify.com/CVE-2025-39682/): Linux Kernel Improper Check for Unusual or Exceptional Conditions (critical 9.8, exploited in the wild)
- [CVE-2024-9680](https://insights.sbomify.com/CVE-2024-9680/): Mozilla Firefox Use-After-Free (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2013-0156 and fix it if it is affected.

What it is: CVE-2013-0156 is a high-severity unsafe deserialization vulnerability in Debian Debian Linux, published on 13 Jan 2013. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2013-0156 exists.

Affected packages and fixed versions:
- actionpack (RubyGems): affected all versions; fixed in 2.3.15
- actionpack (RubyGems): affected all versions; fixed in 2.3.15
- actionpack (RubyGems): affected from 3.0.0; fixed in 3.0.19
- actionpack (RubyGems): affected from 3.0.0; fixed in 3.0.19
- actionpack (RubyGems): affected from 3.1.0; fixed in 3.1.10
- actionpack (RubyGems): affected from 3.1.0; fixed in 3.1.10
- actionpack (RubyGems): affected from 3.2.0; fixed in 3.2.11
- actionpack (RubyGems): affected from 3.2.0; fixed in 3.2.11

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2013-0156/ (Markdown: https://insights.sbomify.com/CVE-2013-0156/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2013-0156
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2013-0156
- OSV: https://osv.dev/vulnerability/CVE-2013-0156

---
From sbomify Insights: https://insights.sbomify.com/CVE-2013-0156/
Summaries are generated and may contain mistakes; the official description above is the record.
