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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | rails | 2:4.2.5.2-1 | — |
| Debian 13 | rails | 2:4.2.5.2-1 | — |
| Debian 12 | rails | 2:4.2.5.2-1 | — |
| Debian 8 | rails | 2:4.1.8-1+deb8u2 | DSA-3509-1 |
| Debian 7 | ruby-actionpack-3.2 | 3.2.6-6+deb7u3 | DLA-604-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 2 | rh-ror41-rubygem-actionpack +1 | 1:4.1.5-4.el6 | RHSA-2016:0456 |
| RHEL 2 | rh-ror41-rubygem-actionview +1 | 4.1.5-5.el6 | RHSA-2016:0456 |
| RHEL 2 | ror40-rubygem-actionpack +1 | 1:4.0.2-7.el6 | RHSA-2016:0454 |
| RHEL 2 | ror40-rubygem-activerecord +1 | 1:4.0.2-6.el6 | RHSA-2016:0454 |
| RHEL 2 | ror40-rubygem-activesupport | 1:4.0.2-4.el6 | RHSA-2016:0454 |
| RHEL 2 | ruby193-rubygem-actionpack +1 | 1:3.2.8-16.el6 | RHSA-2016:0455 |
| RHEL 2 | ruby193-rubygem-activerecord +1 | 1:3.2.8-11.el6 | RHSA-2016:0455 |
| RHEL 2 | ruby193-rubygem-activesupport | 1:3.2.8-6.el6 | RHSA-2016:0455 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 | portus | 2.0.3-2.4 | SUSE-SU-2016:1146-1 |
| SLES 11 SP4 | rubygem-actionpack-3_2 | 3.2.12-0.26.1 | SUSE-SU-2016:0967-1 |
Show 9 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SUSE WebYast 1.3 | rubygem-actionpack-3_2 | 3.2.12-0.26.1 | SUSE-SU-2016:0967-1 |
| SUSE Studio Onsite 1.3 | rubygem-actionpack-3_2 | 3.2.12-0.26.1 | SUSE-SU-2016:0967-1 |
| SUSE OpenStack Cloud 7 | rubygem-actionpack-4_2 +1 | 4.2.9-7.3.1 | SUSE-SU-2017:2716-1 |
| SUSE OpenStack Cloud 7 | rubygem-actionview-4_2 | 4.2.9-9.3.1 | SUSE-SU-2017:2716-1 |
| SUSE OpenStack Cloud 7 | rubygem-activemodel-4_2 +1 | 4.2.9-6.3.1 | SUSE-SU-2017:2716-1 |
| SUSE OpenStack Cloud 7 | rubygem-rails-4_2 +3 | 4.2.9-3.3.1 | SUSE-SU-2017:2716-1 |
| SUSE OpenStack Cloud 7 | rubygem-rails-html-sanitizer | 1.0.3-8.3.1 | SUSE-SU-2017:2716-1 |
| SUSE OpenStack Cloud 6 | rubygem-actionpack-4_2 +1 | 4.2.9-7.3.1 | SUSE-SU-2017:2716-1 |
| SUSE OpenStack Cloud 6 | rubygem-actionview-4_2 | 4.2.2-8.1 | SUSE-SU-2017:2716-1, SUSE-SU-2016:0867-1 |
| SUSE OpenStack Cloud 6 | rubygem-activemodel-4_2 +1 | 4.2.9-6.3.1 | SUSE-SU-2017:2716-1 |
| SUSE OpenStack Cloud 6 | rubygem-rails-4_2 +3 | 4.2.9-3.3.1 | SUSE-SU-2017:2716-1 |
| SUSE OpenStack Cloud 6 | rubygem-rails-html-sanitizer | 1.0.3-8.3.1 | SUSE-SU-2017:2716-1 |
| SUSE OpenStack Cloud 5 | rubygem-actionview-4_1 | 4.1.9-12.1 | SUSE-SU-2016:0854-1 |
| SUSE Lifecycle Management Server 1.3 | rubygem-actionpack-3_2 | 3.2.12-0.26.1 | SUSE-SU-2016:0967-1 |
| SUSE Enterprise Storage 4 | rubygem-actionpack-4_2 +1 | 4.2.9-7.3.1 | SUSE-SU-2017:2716-1 |
| SUSE Enterprise Storage 4 | rubygem-actionview-4_2 | 4.2.9-9.3.1 | SUSE-SU-2017:2716-1 |
| SUSE Enterprise Storage 4 | rubygem-activemodel-4_2 +1 | 4.2.9-6.3.1 | SUSE-SU-2017:2716-1 |
| SUSE Enterprise Storage 4 | rubygem-rails-4_2 +3 | 4.2.9-3.3.1 | SUSE-SU-2017:2716-1 |
| SUSE Enterprise Storage 4 | rubygem-rails-html-sanitizer | 1.0.3-8.3.1 | SUSE-SU-2017:2716-1 |
| SUSE Enterprise Storage 3 | rubygem-actionpack-4_2 +1 | 4.2.9-7.3.1 | SUSE-SU-2017:2716-1 |
| SUSE Enterprise Storage 3 | rubygem-actionview-4_2 | 4.2.9-9.3.1 | SUSE-SU-2017:2716-1 |
| SUSE Enterprise Storage 3 | rubygem-activemodel-4_2 +1 | 4.2.9-6.3.1 | SUSE-SU-2017:2716-1 |
| SUSE Enterprise Storage 3 | rubygem-rails-4_2 +3 | 4.2.9-3.3.1 | SUSE-SU-2017:2716-1 |
| SUSE Enterprise Storage 3 | rubygem-rails-html-sanitizer | 1.0.3-8.3.1 | SUSE-SU-2017:2716-1 |
| SUSE Enterprise Storage 2.1 | rubygem-actionview-4_2 | 4.2.2-8.1 | SUSE-SU-2016:0867-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | rubygem-actionview-4_2 | 5.0.0.1-1.1 | openSUSE-SU-2024:10057-1 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Ruby on Rails ActionPack Inline ERB Code Execution
exploit/multi/http/rails_actionpack_inline_exec
Exploit-DB 1
- Ruby on Rails ActionPack Inline ERB - Code Execution (Metasploit) EDB-40086 · remote · Jul 11, 2016 · verified
GitHub 12 repositories · most starred shown
-
0x00-0x00/CVE-2016-2098 ★ 16 · Feb 9, 2018
Ruby On Rails unrestricted render() exploit
-
j4k0m/CVE-2016-2098 ★ 4 · Aug 31, 2021
Remote code execution vulnerability in Ruby-on-Rails when using render on user-supplied data.
-
hderms/dh-CVE_2016_2098 ★ 3 · Mar 1, 2016
Proof of concept showing how CVE-2016-2098 leads to remote code execution
-
Shakun8/CVE-2016-2098 ★ 2 · Sep 24, 2022
CVE-2016-2098 POC
-
DanielHemmati/CVE-2016-2098-my-first-exploit ★ 2 · Jul 27, 2020
This exploit is remote code execution vulnerability in Ruby-on-Rails when using render on user-supplied data
-
its-arun/CVE-2016-2098 ★ 1 · Jun 19, 2018
CVE-2016-2098 simple POC written in bash
-
Alejandro-MartinG/rails-PoC-CVE-2016-2098 ★ 1 · Jan 25, 2017
Proof of concept CVE-2016-2098
-
CyberDefenseInstitute/PoC_CVE-2016-2098_Rails42 ★ 1 · Jun 7, 2016
A PoC of CVE-2016-2098 (rails4.2.5.1 / view render)
-
Debalinax64/CVE-2016-2098 ★ 0 · Apr 7, 2021
CVE-2016-2098 - POC of RCE Ruby on Rails: Improper Input Validation (CVE-2016-2098) in bash. Remote attackers can execute arbitrary Ruby code by leveraging an application's unrestricted use of the re…
-
3rg1s/CVE-2016-2098 ★ 0 · Oct 30, 2019
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| RubyGems | actionpack | >= 3.0.0, < 3.2.22.2 | 3.2.22.2 | GHSA-78rc-8c29-p45g |
| RubyGems | actionpack | >= 4.0.0, < 4.1.14.2 | 4.1.14.2 | GHSA-78rc-8c29-p45g |
| RubyGems | actionpack | >= 4.2.0, < 4.2.5.2 | 4.2.5.2 | GHSA-78rc-8c29-p45g |
Advisories 11
- RHSA-2016:0455 Red Hat Security Advisory: ruby193 security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2016:0456 Red Hat Security Advisory: rh-ror41 security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2016:0454 Red Hat Security Advisory: ror40 security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- DLA-604-1 ruby-actionpack-3.2 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DSA-3509-1 rails - security update Debian Security (DSA / DLA) · Mar 9, 2026
- SUSE-SU-2016:0967-1 Security update for rubygem-actionpack-3_2 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2016:1146-1 Security update for portus SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2016:0867-1 Security update for rubygem-actionview-4_2 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2017:2716-1 Security update for the Ruby on Rails stack SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:10057-1 ruby2.2-rubygem-actionview-4_2-4.2.7.1-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2016:0854-1 Security update for rubygem-actionview-4_1 SUSE / openSUSE Security Updates · Feb 4, 2026
References
- SUSE-SU-2016:0867 vendor-advisory
- SUSE-SU-2016:0967 vendor-advisory
- DSA-3509 vendor-advisory
- 83725 vdb-entry
- 1035122 vdb-entry
- 40086 exploit
- SUSE-SU-2016:0854 vendor-advisory
- openSUSE-SU-2016:0790 vendor-advisory
- SUSE-SU-2016:1146 vendor-advisory
- openSUSE-SU-2016:0835 vendor-advisory
- [ruby-security-ann] 20160229 [CVE-2016-2098] Possible remote code execution vulnerability in Action Pack mailing-list
- http://weblog.rubyonrails.org/2016/2/29/Rails-4-2-5-2-4-1-14-2-3-2-22-2-have-been-released/