CVE-2016-2097
actionview contains Path Traversal vulnerability
Directory traversal vulnerability in Action View in Ruby on Rails before 3.2.22.2 and 4.x before 4.1.14.2 allows remote attackers to read arbitrary files by leveraging an application's unrestricted use of the render method and providing a .. (dot dot) in a pathname. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-0752.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
5.3
Directory traversal vulnerability in Action View in Ruby on Rails before 3.2.22.2 and 4.x before 4.1.14.2 allows remote attackers to read arbitrary files by leveraging an application's unrestricted use of the render method and providing a .. (dot dot) in a pathname. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-0752.
- Record
CVE-2016-2097- CVSS 3.0
- 5.3 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:P/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
CVE List No score
Directory traversal vulnerability in Action View in Ruby on Rails before 3.2.22.2 and 4.x before 4.1.14.2 allows remote attackers to read arbitrary files by leveraging an application's unrestricted use of the render method and providing a .. (dot dot) in a pathname. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-0752.
- Record
CVE-2016-2097- Updated
- 2026-11-02
EUVDEUVD-2017-0314 No score
Directory traversal vulnerability in Action View in Ruby on Rails before 3.2.22.2 and 4.x before 4.1.14.2 allows remote attackers to read arbitrary files by leveraging an application's unrestricted use of the render method and providing a .. (dot dot) in a pathname. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-0752.
- Record
EUVD-2017-0314- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-vx9j-46rh-fqr8
5.3
actionview contains Path Traversal vulnerability
There is a possible directory traversal and information leak vulnerability in Action View. This was meant to be fixed on CVE-2016-0752. However the 3.2 patch was not covering all possible scenarios. This vulnerability has been assigned the CVE identifier CVE-2016-2097.
Versions Affected: 3.2.x, 4.0.x, 4.1.x Not affected: 4.2+ Fixed Versions: 3.2.22.2, 4.1.14.2
Impact
Applications that pass unverified user input to the render method in a controller may be vulnerable to an information leak vulnerability.
Impacted code will look something like this:
def index
render params[:id]
end
Carefully crafted requests can cause the above code to render files from unexpected places like outside the application's view directory, and can possibly escalate this to a remote code execution attack.
All users running an affected release should either upgrade or use one of the workarounds immediately.
Releases
The FIXED releases are available at the normal locations.
Workarounds
A workaround to this issue is to not pass arbitrary user input to the render method. Instead, verify that data before passing it to the render method.
For example, change this:
def index
render params[:id]
end
To this:
def index
render verify_template(params[:id])
end
private
def verify_template(name)
# add verification logic particular to your application here
end
Patches
To aid users who aren't able to upgrade immediately we have provided patches for it. It is in git-am format and consist of a single changeset.
- 3-2-render_data_leak_2.patch - Patch for 3.2 series
- 4-1-render_data_leak_2.patch - Patch for 4.1 series
Credits
Thanks to both Jyoti Singh and Tobias Kraze from makandra for reporting this and working with us in the patch!
- Record
GHSA-vx9j-46rh-fqr8- CVSS 3.0
- 5.3 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
OSV
5.3
Directory traversal vulnerability in Action View in Ruby on Rails before 3.2.22.2 and 4.x before 4.1.14.2 allows remote attackers to read arbitrary files by leveraging an application's unrestricted use of the render method and providing a .. (dot dot) in a pathname. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-0752.
- Record
CVE-2016-2097- CVSS 3.0
- 5.3 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2016-2097
5.3
Directory traversal vulnerability in Action View in Ruby on Rails before 3.2.22.2 and 4.x before 4.1.14.2 allows remote attackers to read arbitrary files by leveraging an application's unrestricted use of the render method and providing a .. (dot dot) in a pathname. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-0752.
- Record
DEBIAN-CVE-2016-2097- CVSS 3.0
- 5.3 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-02
Show 4 moreShow less
OSVGHSA-vx9j-46rh-fqr8
5.3
actionview contains Path Traversal vulnerability
There is a possible directory traversal and information leak vulnerability in Action View. This was meant to be fixed on CVE-2016-0752. However the 3.2 patch was not covering all possible scenarios. This vulnerability has been assigned the CVE identifier CVE-2016-2097.
Versions Affected: 3.2.x, 4.0.x, 4.1.x Not affected: 4.2+ Fixed Versions: 3.2.22.2, 4.1.14.2
Impact
Applications that pass unverified user input to the render method in a controller may be vulnerable to an information leak vulnerability.
Impacted code will look something like this:
def index
render params[:id]
end
Carefully crafted requests can cause the above code to render files from unexpected places like outside the application's view directory, and can possibly escalate this to a remote code execution attack.
All users running an affected release should either upgrade or use one of the workarounds immediately.
Releases
The FIXED releases are available at the normal locations.
Workarounds
A workaround to this issue is to not pass arbitrary user input to the render method. Instead, verify that data before passing it to the render method.
For example, change this:
def index
render params[:id]
end
To this:
def index
render verify_template(params[:id])
end
private
def verify_template(name)
# add verification logic particular to your application here
end
Patches
To aid users who aren't able to upgrade immediately we have provided patches for it. It is in git-am format and consist of a single changeset.
- 3-2-render_data_leak_2.patch - Patch for 3.2 series
- 4-1-render_data_leak_2.patch - Patch for 4.1 series
Credits
Thanks to both Jyoti Singh and Tobias Kraze from makandra for reporting this and working with us in the patch!
- Record
GHSA-vx9j-46rh-fqr8- CVSS 3.0
- 5.3 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVSUSE-SU-2016:0854-1 No score
Security update for rubygem-actionview-4_1
This update for rubygem-actionview-4_1 fixes the following issues:
-
CVE-2016-2097: rubygem-actionview: Possible Information Leak Vulnerability in Action View. (bsc#968850)
-
CVE-2016-2098: rubygem-actionpack: Possible remote code execution vulnerability in Action Pack (bsc#968849)
- Record
SUSE-SU-2016:0854-1- Updated
- 2026-11-02
OSVSUSE-SU-2016:0967-1 No score
Security update for rubygem-actionpack-3_2
This update for rubygem-actionpack-3_2 fixes the following issues:
-
CVE-2016-2097: rubygem-actionview: Possible Information Leak Vulnerability in Action View. (bsc#968850)
-
CVE-2016-2098: rubygem-actionpack: Possible remote code execution vulnerability in Action Pack (bsc#968849)
- Record
SUSE-SU-2016:0967-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:15116-1 No score
Security update for rubygem-actionpack-3_2
This update for rubygem-actionpack-3_2 fixes the following issues:
- CVE-2021-22885: Fixed Possible Information Disclosure / Unintended Method Execution in Action Pack (bsc#1185715).
- CVE-2016-2097: Fixed Possible Information Leak Vulnerability in Action View (bsc#968850).
- Record
SUSE-SU-2022:15116-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
actionviewRubyGems |
3.0.0 to 3.2.22.1 | 3.2.22.2 |
actionviewRubyGems |
4.0.0 to 4.1.14.1 | 4.1.14.2 |
actionpackRubyGems |
3.0.0 to 3.2.22.1 | 3.2.22.2 |
actionpackRubyGems |
4.0.0 to 4.1.14.1 | 4.1.14.2 |
railsDebian:12 |
before 2:4.2.5.2-1 | 2:4.2.5.2-1 |
railsDebian:13 |
before 2:4.2.5.2-1 | 2:4.2.5.2-1 |
railsDebian:14 |
before 2:4.2.5.2-1 | 2:4.2.5.2-1 |
ruby-actionpack-3.2Debian:7 |
before 3.2.6-6+deb7u3, plus listed versions 3.2.6-63.2.6-6+deb7u13.2.6-6+deb7u2 |
3.2.6-6+deb7u3 |
railsDebian:8 |
before 2:4.1.8-1+deb8u2, plus listed versions 2:4.1.8-12:4.1.8-1+deb8u1 |
2:4.1.8-1+deb8u2 |
actionviewRubyGems |
3.0.0 up to 3.2.22.2 | 3.2.22.2 |
Show 37 moreShow less
| Package | Affected | Fixed |
|---|---|---|
actionviewRubyGems |
4.0.0 up to 4.1.14.2, plus listed versions 4.1.04.1.0.beta14.1.0.beta24.1.0.rc14.1.0.rc2 Show 30 moreShow less4.1.14.1.104.1.10.rc14.1.10.rc24.1.10.rc34.1.10.rc44.1.114.1.124.1.12.rc14.1.134.1.13.rc14.1.144.1.14.14.1.14.rc14.1.14.rc24.1.24.1.2.rc14.1.2.rc24.1.2.rc34.1.34.1.44.1.54.1.64.1.6.rc14.1.6.rc24.1.74.1.7.14.1.84.1.94.1.9.rc1 |
4.1.14.2 |
actionpackRubyGems |
3.0.0 up to 3.2.22.2, plus listed versions 3.0.13.0.103.0.10.rc13.0.113.0.12 Show 45 moreShow less3.0.12.rc13.0.133.0.13.rc13.0.143.0.153.0.163.0.173.0.183.0.193.0.23.0.203.0.33.0.43.0.4.rc13.0.53.0.5.rc13.0.63.0.6.rc13.0.6.rc23.0.73.0.7.rc13.0.7.rc23.0.83.0.8.rc13.0.8.rc23.0.8.rc43.0.93.0.9.rc13.0.9.rc33.0.9.rc43.0.9.rc53.1.03.1.0.beta13.1.0.rc13.1.0.rc23.1.0.rc33.1.0.rc43.1.0.rc53.1.0.rc63.1.0.rc83.1.13.1.1.rc13.1.1.rc23.1.1.rc33.1.10 |
3.2.22.2 |
actionpackRubyGems |
4.0.0 up to 4.1.14.2, plus listed versions 4.0.14.0.1.rc14.0.1.rc24.0.1.rc34.0.1.rc4 Show 45 moreShow less4.0.104.0.10.rc14.0.10.rc24.0.114.0.11.14.0.124.0.134.0.13.rc14.0.24.0.34.0.44.0.4.rc14.0.54.0.64.0.6.rc14.0.6.rc24.0.6.rc34.0.74.0.84.0.94.1.04.1.0.beta14.1.0.beta24.1.0.rc14.1.0.rc24.1.14.1.104.1.10.rc14.1.10.rc24.1.10.rc34.1.10.rc44.1.114.1.124.1.12.rc14.1.134.1.13.rc14.1.144.1.14.14.1.14.rc14.1.14.rc24.1.24.1.2.rc14.1.2.rc24.1.2.rc34.1.3 |
4.1.14.2 |
ror40-rubygem-actionpackRed Hat:rhel_software_collections:2::el6 |
before 1:4.0.2-7.el6 | 1:4.0.2-7.el6 |
ror40-rubygem-actionpack-docRed Hat:rhel_software_collections:2::el6 |
before 1:4.0.2-7.el6 | 1:4.0.2-7.el6 |
ror40-rubygem-activerecordRed Hat:rhel_software_collections:2::el6 |
before 1:4.0.2-6.el6 | 1:4.0.2-6.el6 |
ror40-rubygem-activerecord-docRed Hat:rhel_software_collections:2::el6 |
before 1:4.0.2-6.el6 | 1:4.0.2-6.el6 |
ror40-rubygem-activesupportRed Hat:rhel_software_collections:2::el6 |
before 1:4.0.2-4.el6 | 1:4.0.2-4.el6 |
ror40-rubygem-actionpackRed Hat:rhel_software_collections:2::el7 |
before 1:4.0.2-7.el7 | 1:4.0.2-7.el7 |
ror40-rubygem-actionpack-docRed Hat:rhel_software_collections:2::el7 |
before 1:4.0.2-7.el7 | 1:4.0.2-7.el7 |
ror40-rubygem-activerecordRed Hat:rhel_software_collections:2::el7 |
before 1:4.0.2-6.el7 | 1:4.0.2-6.el7 |
ror40-rubygem-activerecord-docRed Hat:rhel_software_collections:2::el7 |
before 1:4.0.2-6.el7 | 1:4.0.2-6.el7 |
ror40-rubygem-activesupportRed Hat:rhel_software_collections:2::el7 |
before 1:4.0.2-4.el7 | 1:4.0.2-4.el7 |
ruby193-rubygem-actionpackRed Hat:rhel_software_collections:2::el6 |
before 1:3.2.8-16.el6 | 1:3.2.8-16.el6 |
ruby193-rubygem-actionpack-docRed Hat:rhel_software_collections:2::el6 |
before 1:3.2.8-16.el6 | 1:3.2.8-16.el6 |
ruby193-rubygem-activerecordRed Hat:rhel_software_collections:2::el6 |
before 1:3.2.8-11.el6 | 1:3.2.8-11.el6 |
ruby193-rubygem-activerecord-docRed Hat:rhel_software_collections:2::el6 |
before 1:3.2.8-11.el6 | 1:3.2.8-11.el6 |
ruby193-rubygem-activesupportRed Hat:rhel_software_collections:2::el6 |
before 1:3.2.8-6.el6 | 1:3.2.8-6.el6 |
ruby193-rubygem-actionpackRed Hat:rhel_software_collections:2::el7 |
before 1:3.2.8-16.el7 | 1:3.2.8-16.el7 |
ruby193-rubygem-actionpack-docRed Hat:rhel_software_collections:2::el7 |
before 1:3.2.8-16.el7 | 1:3.2.8-16.el7 |
ruby193-rubygem-activerecordRed Hat:rhel_software_collections:2::el7 |
before 1:3.2.8-11.el7 | 1:3.2.8-11.el7 |
ruby193-rubygem-activerecord-docRed Hat:rhel_software_collections:2::el7 |
before 1:3.2.8-11.el7 | 1:3.2.8-11.el7 |
ruby193-rubygem-activesupportRed Hat:rhel_software_collections:2::el7 |
before 1:3.2.8-6.el7 | 1:3.2.8-6.el7 |
rh-ror41-rubygem-actionpackRed Hat:rhel_software_collections:2::el6 |
before 1:4.1.5-4.el6 | 1:4.1.5-4.el6 |
rh-ror41-rubygem-actionpack-docRed Hat:rhel_software_collections:2::el6 |
before 1:4.1.5-4.el6 | 1:4.1.5-4.el6 |
rh-ror41-rubygem-actionviewRed Hat:rhel_software_collections:2::el6 |
before 0:4.1.5-5.el6 | 0:4.1.5-5.el6 |
rh-ror41-rubygem-actionview-docRed Hat:rhel_software_collections:2::el6 |
before 0:4.1.5-5.el6 | 0:4.1.5-5.el6 |
rh-ror41-rubygem-actionpackRed Hat:rhel_software_collections:2::el7 |
before 1:4.1.5-4.el7 | 1:4.1.5-4.el7 |
rh-ror41-rubygem-actionpack-docRed Hat:rhel_software_collections:2::el7 |
before 1:4.1.5-4.el7 | 1:4.1.5-4.el7 |
rh-ror41-rubygem-actionviewRed Hat:rhel_software_collections:2::el7 |
before 0:4.1.5-5.el7 | 0:4.1.5-5.el7 |
rh-ror41-rubygem-actionview-docRed Hat:rhel_software_collections:2::el7 |
before 0:4.1.5-5.el7 | 0:4.1.5-5.el7 |
rubygem-actionview-4_1SUSE:OpenStack Cloud 5 |
before 4.1.9-12.1 | 4.1.9-12.1 |
rubygem-actionpack-3_2SUSE:Linux Enterprise Software Development Kit 11 SP4 |
before 3.2.12-0.26.1 | 3.2.12-0.26.1 |
rubygem-actionpack-3_2SUSE:Lifecycle Management Server 1.3 |
before 3.2.12-0.26.1 | 3.2.12-0.26.1 |
rubygem-actionpack-3_2SUSE:Studio Onsite 1.3 |
before 3.2.12-0.26.1 | 3.2.12-0.26.1 |
rubygem-actionpack-3_2SUSE:WebYast 1.3 |
before 3.2.12-0.26.1 | 3.2.12-0.26.1 |
rubygem-actionpack-3_2SUSE:WebYast 1.3 |
before 3.2.12-0.27.3.1 | 3.2.12-0.27.3.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2016-2097 is a medium vulnerability (CVSS 5.3) in Rubyonrails Rails, published March 9, 2016. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 4.42%, the 91st percentile. Fixed in actionview 3.2.22.2.
References
lists.opensuse.org/opensuse-security-announce/2016-04/msg00006.html
debian.org/security/2016/dsa-3509
groups.google.com/forum/message/raw?msg=rubyonrails-security/ddY6HgqB2z4/we0RasMZIAAJ
securitytracker.com/id/1035122
lists.opensuse.org/opensuse-security-announce/2016-03/msg00083.html
securityfocus.com/bid/83726
Show 59 moreShow less
lists.opensuse.org/opensuse-security-announce/2016-03/msg00080.html
weblog.rubyonrails.org/2016/2/29/Rails-4-2-5-2-4-1-14-2-3-2-22-2-have-been-released
nvd.nist.gov/vuln/detail/CVE-2016-2097
web.archive.org/web/20160322002234/http://www.securitytracker.com/id/1035122
web.archive.org/web/20200228015320/http://www.securityfocus.com/bid/83726
github.com/rails/rails/commit/8a1d3ea617ffb0c8ae8467fa439bf63a3bfc4324
github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2016-2097.yml
github.com/rubysec/ruby-advisory-db/blob/master/gems/actionview/CVE-2016-2097.yml
groups.google.com/forum
web.archive.org/web/20201221115217/https://groups.google.com/forum/message/raw?msg=rubyonrails-security/ddY6HgqB2z4/we0RasMZIAAJ
github.com/advisories/GHSA-vx9j-46rh-fqr8
security-tracker.debian.org/tracker/CVE-2016-2097
github.com/rails/rails
access.redhat.com/errata/RHSA-2016:0454
access.redhat.com/security/updates/classification
bugzilla.redhat.com/show_bug.cgi?id=1301933
bugzilla.redhat.com/show_bug.cgi?id=1301946
bugzilla.redhat.com/show_bug.cgi?id=1301957
bugzilla.redhat.com/show_bug.cgi?id=1301963
bugzilla.redhat.com/show_bug.cgi?id=1301981
bugzilla.redhat.com/show_bug.cgi?id=1310043
bugzilla.redhat.com/show_bug.cgi?id=1310054
security.access.redhat.com/data/csaf/v2/advisories/2016/rhsa-2016_0454.json
access.redhat.com/security/cve/CVE-2015-7576
cve.org/CVERecord?id=CVE-2015-7576
nvd.nist.gov/vuln/detail/CVE-2015-7576
weblog.rubyonrails.org/2016/1/25/Rails-5-0-0-beta1-1-4-2-5-1-4-1-14-1-3-2-22-1-and-rails-html-sanitizer-1-0-3-have-been-released
access.redhat.com/security/cve/CVE-2015-7577
cve.org/CVERecord?id=CVE-2015-7577
nvd.nist.gov/vuln/detail/CVE-2015-7577
access.redhat.com/security/cve/CVE-2015-7581
cve.org/CVERecord?id=CVE-2015-7581
nvd.nist.gov/vuln/detail/CVE-2015-7581
access.redhat.com/security/cve/CVE-2016-0751
cve.org/CVERecord?id=CVE-2016-0751
nvd.nist.gov/vuln/detail/CVE-2016-0751
access.redhat.com/security/cve/CVE-2016-0752
cve.org/CVERecord?id=CVE-2016-0752
nvd.nist.gov/vuln/detail/CVE-2016-0752
nvisium.com/blog/2016/01/26/rails-dynamic-render-to-rce-cve-2016-0752
cisa.gov/known-exploited-vulnerabilities-catalog
access.redhat.com/security/cve/CVE-2016-2097
cve.org/CVERecord?id=CVE-2016-2097
access.redhat.com/security/cve/CVE-2016-2098
cve.org/CVERecord?id=CVE-2016-2098
nvd.nist.gov/vuln/detail/CVE-2016-2098
access.redhat.com/errata/RHSA-2016:0455
security.access.redhat.com/data/csaf/v2/advisories/2016/rhsa-2016_0455.json
access.redhat.com/errata/RHSA-2016:0456
security.access.redhat.com/data/csaf/v2/advisories/2016/rhsa-2016_0456.json
suse.com/support/update/announcement/2016/suse-su-20160854-1
bugzilla.suse.com/968849
bugzilla.suse.com/968850
suse.com/security/cve/CVE-2016-2097
suse.com/security/cve/CVE-2016-2098
suse.com/support/update/announcement/2016/suse-su-20160967-1
suse.com/support/update/announcement/2022/suse-su-202215116-1
bugzilla.suse.com/1185715
suse.com/security/cve/CVE-2021-22885
Left out here: 67 versions. The JSON record has them.