Bug 1301963 - (CVE-2016-0752) CVE-2016-0752 rubygem-actionview, rubygem-actionpack: directory traversal flaw in Action View
CVE-2016-0752 rubygem-actionview, rubygem-actionpack: directory traversal fla...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
high Severity high
: ---
: ---
Assigned To: Red Hat Product Security
impact=important,public=20160125,repo...
: Security
Depends On: 1301964 1306275 1306276 1306277 1306278 1306279 1306281 1306288 1306289
Blocks: 1302006
  Show dependency treegraph
 
Reported: 2016-01-26 07:55 EST by Adam Mariš
Modified: 2018-02-12 15:00 EST (History)
33 users (show)

See Also:
Fixed In Version: rubygem-actionview 5.0.0.beta1.1, rubygem-actionview 4.2.5.1, rubygem-actionview 4.1.14.1, rubygem-pack 3.2.22.1
Doc Type: Bug Fix
Doc Text:
A directory traversal flaw was found in the way the Action View component searched for templates for rendering. If an application passed untrusted input to the 'render' method, a remote, unauthenticated attacker could use this flaw to render unexpected files and, possibly, execute arbitrary code.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-15 17:22:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
3.2 patch (5.95 KB, patch)
2016-01-29 10:02 EST, Ján Rusnačko
no flags Details | Diff
4.1 patch (11.33 KB, patch)
2016-01-29 10:02 EST, Ján Rusnačko
no flags Details | Diff
4.2 patch (11.33 KB, patch)
2016-01-29 10:03 EST, Ján Rusnačko
no flags Details | Diff
5.0 patch (11.04 KB, patch)
2016-01-29 10:04 EST, Ján Rusnačko
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:0296 normal SHIPPED_LIVE Important: rh-ror41 security update 2016-02-24 10:36:00 EST
Red Hat Product Errata RHSA-2016:0454 normal SHIPPED_LIVE Important: ror40 security update 2016-03-15 20:56:17 EDT
Red Hat Product Errata RHSA-2016:0455 normal SHIPPED_LIVE Important: ruby193 security update 2016-03-15 20:55:59 EDT

  None (edit)
Description Adam Mariš 2016-01-26 07:55:44 EST
A possible directory traversal and information leak vulnerability in Action View was reported. Applications that pass unverified user input to the `render` method in a controller may be vulnerable to an information leak vulnerability.

Vulnerable code:

```ruby
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 versions are affected.

http://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/

External References:

https://groups.google.com/forum/#!msg/rubyonrails-security/335P1DcLG00/OfB9_LhbFQAJ
https://nvisium.com/blog/2016/01/26/rails-dynamic-render-to-rce-cve-2016-0752/
Comment 1 Adam Mariš 2016-01-26 07:56:12 EST
Created rubygem-actionview tracking bugs for this issue:

Affects: fedora-all [bug 1301964]
Comment 2 Adam Mariš 2016-01-26 10:23:49 EST
Acknowledgments:

Red Hat would like to thank Ruby on Rails project for reporting this issue.
Upstream acknowledges John Poulin as the original reporter.
Comment 3 Ján Rusnačko 2016-01-29 10:02 EST
Created attachment 1119445 [details]
3.2 patch
Comment 4 Ján Rusnačko 2016-01-29 10:02 EST
Created attachment 1119446 [details]
4.1 patch
Comment 5 Ján Rusnačko 2016-01-29 10:03 EST
Created attachment 1119447 [details]
4.2 patch
Comment 6 Ján Rusnačko 2016-01-29 10:04 EST
Created attachment 1119449 [details]
5.0 patch
Comment 14 errata-xmlrpc 2016-02-24 05:37:27 EST
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6

Via RHSA-2016:0296 https://rhn.redhat.com/errata/RHSA-2016-0296.html
Comment 15 Fedora Update System 2016-02-28 03:27:55 EST
rubygem-actionview-4.2.0-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 16 Fedora Update System 2016-02-28 07:26:40 EST
rubygem-actionview-4.2.3-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 18 errata-xmlrpc 2016-03-15 17:00:40 EDT
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS

Via RHSA-2016:0455 https://rhn.redhat.com/errata/RHSA-2016-0455.html
Comment 19 errata-xmlrpc 2016-03-15 17:03:31 EDT
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS

Via RHSA-2016:0454 https://rhn.redhat.com/errata/RHSA-2016-0454.html
Comment 20 Stephen Herr 2017-12-01 19:16:17 EST
Mitigation:

Avoid passing untrusted input to render method, or verify the input using whitelist before passing it to the render method:

```

def index
  render verify_template(params[:id])
end

private
def verify_template(name)
  # add verification logic particular to your application here
end

```

Note You need to log in before you can comment on or make changes to this bug.