# CVE-2016-2098: actionpack allows remote code execution via application's unrestricted use of render method

> Remote attackers can execute arbitrary Ruby code in Rails applications that improperly use the render method without restrictions.

- **Severity:** High 7.3 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 7 Apr 2016
- **Updated:** 5 Aug 2024
- **Also known as:** DEBIAN-CVE-2016-2098, GHSA-78rc-8c29-p45g, SUSE-SU-2016:0867-1, openSUSE-SU-2024:10057-1

## What is CVE-2016-2098?

CVE-2016-2098 is a high-severity code injection vulnerability in Debian Debian Linux, published on 7 Apr 2016. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Action Pack in Ruby on Rails before 3.2.22.2, 4.x before 4.1.14.2, and 4.2.x before 4.2.5.2 allows remote attackers to execute arbitrary Ruby code by leveraging an application's unrestricted use of the render method.

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2016-2098?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `actionpack` | RubyGems | From 3.0.0 | 3.2.22.2 |
| `actionpack` | RubyGems | From 3.0.0 | 3.2.22.2 |
| `actionpack` | RubyGems | From 4.0.0 | 4.1.14.2 |
| `actionpack` | RubyGems | From 4.0.0 | 4.1.14.2 |
| `actionpack` | RubyGems | From 4.2.0 | 4.2.5.2 |
| `actionpack` | RubyGems | From 4.2.0 | 4.2.5.2 |
| `rubygem-actionview-4_2` | SUSE:Enterprise Storage 2.1 | All versions | 4.2.2-8.1 |
| `rubygem-actionview-4_2` | SUSE:OpenStack Cloud 6 | All versions | 4.2.2-8.1 |
| `rubygem-actionview-4_2` | openSUSE:Tumbleweed | All versions | 5.0.0.1-1.1 |

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

## How do I fix CVE-2016-2098?

Upgrade actionpack to a fixed version for your release line: 3.2.22.2, 4.1.14.2 or 4.2.5.2.

## Is CVE-2016-2098 being exploited?

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

Public exploit code:

- Ruby On Rails unrestricted render() exploit (github_poc): https://github.com/0x00-0x00/CVE-2016-2098
- Remote code execution vulnerability in Ruby-on-Rails when using render on user-supplied data. (github_poc): https://github.com/j4k0m/CVE-2016-2098
- Proof of concept showing how CVE-2016-2098 leads to remote code execution (github_poc): https://github.com/hderms/dh-CVE_2016_2098
- This exploit is remote code execution vulnerability in Ruby-on-Rails when using render on user-supplied data (github_poc): https://github.com/DanielHemmati/CVE-2016-2098-my-first-exploit
- CVE-2016-2098 POC (github_poc): https://github.com/Shakun8/CVE-2016-2098
- A PoC of CVE-2016-2098 (rails4.2.5.1 / view render) (github_poc): https://github.com/CyberDefenseInstitute/PoC_CVE-2016-2098_Rails42

## 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-2016-2098 and fix it if it is affected.

What it is: CVE-2016-2098 is a high-severity code injection vulnerability in Debian Debian Linux, published on 7 Apr 2016. 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-2016-2098 exists.

Affected packages and fixed versions:
- actionpack (RubyGems): affected from 3.0.0; fixed in 3.2.22.2
- actionpack (RubyGems): affected from 3.0.0; fixed in 3.2.22.2
- actionpack (RubyGems): affected from 4.0.0; fixed in 4.1.14.2
- actionpack (RubyGems): affected from 4.0.0; fixed in 4.1.14.2
- actionpack (RubyGems): affected from 4.2.0; fixed in 4.2.5.2
- actionpack (RubyGems): affected from 4.2.0; fixed in 4.2.5.2

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-2016-2098/ (Markdown: https://insights.sbomify.com/CVE-2016-2098/index.md)
```

## Sources

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

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