Rails Rails Asset Pipeline Directory Traversal Vulnerability

Aiken00 · 2018年06月20日 · 最后由 Rei 回复于 2018年06月20日 · 1047 次阅读


Specially crafted requests can be used to access files that exists on the filesystem that is outside an application's root directory, when the Sprockets server is used in production.

All users running an affected release should either upgrade or use one of the work arounds immediately.


The 4.0.0.beta8, 3.7.2 and 2.12.5 releases are available at the normal locations.


In Rails applications, work around this issue, set config.assets.compile = false and config.public_file_server.enabled = true in an initializer and precompile the assets.

This work around will not be possible in all hosting environments and upgrading is advised.


To aid users who aren't able to upgrade immediately we have provided patches for the three supported release series. They are in git-am format and consist of a single changeset.

  • 4-0-fix-path-traversal.patch - Patch for the 4.0.x release series
  • 3-7-fix-path-traversal.patch - Patch for the 3.7.x release series
  • 2-12-fix-path-traversal.patch - Patch for the 2.12.x release series

https://groups.google.com/forum/#! topic/rubyonrails-security/ft_J--l55fM

需要 登录 后方可回复, 如果你还没有账号请 注册新账号