Providing security resources for the Ruby community.
Follow us @rubysec or email us via info at

Advisory Archive


gem: actionview
date: 2016-01-25
cve: 2016-0752
title: Possible Information Leak Vulnerability in Action View
description: "There is a possible directory traversal and information leak vulnerability
  in \nAction View. This vulnerability has been assigned the CVE identifier \nCVE-2016-0752.
  \n\nVersions Affected:  All. \nNot affected:       None. \nFixed Versions:     5.0.0.beta1.1,,, \n\nImpact \n------ \nApplications that pass unverified
  user input to the `render` method in a \ncontroller may be vulnerable to an information
  leak vulnerability. \n\nImpacted code will look something like this: \n\n```ruby
  \ndef index \n  render params[:id] \nend \n``` \n\nCarefully crafted requests can
  cause the above code to render files from \nunexpected places like outside the application's
  view directory, and can \npossibly escalate this to a remote code execution attack.
  \n\nAll users running an affected release should either upgrade or use one of the
  \nworkarounds immediately. \n\nReleases \n-------- \nThe FIXED releases are available
  at the normal locations. \n\nWorkarounds \n----------- \nA workaround to this issue
  is to not pass arbitrary user input to the `render` \nmethod.  Instead, verify that
  data before passing it to the `render` method. \n\nFor example, change this: \n\n```ruby
  \ndef index \n  render params[:id] \nend \n``` \n\nTo this: \n\n```ruby \ndef index
  \n  render verify_template(params[:id]) \nend \n\nprivate \ndef verify_template(name)
  \n  # add verification logic particular to your application here \nend \n``` \n\nPatches
  \n------- \nTo aid users who aren't able to upgrade immediately we have provided
  patches for \nthe two supported release series. They are in git-am format and consist
  of a \nsingle changeset. \n\n* 3-2-render_data_leak.patch - Patch for 3.2 series
  \n* 4-1-render_data_leak.patch - Patch for 4.1 series \n* 4-2-render_data_leak.patch
  - Patch for 4.2 series \n* 5-0-render_data_leak.patch - Patch for 5.0 series \n\nPlease
  note that only the 4.1.x and 4.2.x series are supported at present. Users \nof earlier
  unsupported releases are advised to upgrade as soon as possible as we \ncannot guarantee
  the continued availability of security fixes for unsupported \nreleases. \n\nCredits
  \n------- \nThanks John Poulin for reporting this!\n"
- "~> 5.0.0.beta1.1"
- "~> 4.2.5, >="
- "~> 4.1.14, >="