Digital Security Research Group [DSecRG] Advisory #DSECRG-08-018
WEBrick Httpd server has directory traversal security vulnerability. WEBrick is an HTTP server library written in Ruby that uses servlets to extend its capabilities. Built into WEBrick are four servlets, handling CGI, ERb, file directories, and a generic Proc servlet. Ruby on Rails uses WEBrick as a quick and easy webserver to start developing your Rails applications. However, for whatever ease of development WEBrick adds to your application, it is generally considered not suitable for any production environment. The vulnerability is caused due to an input validation error in the WEBrick::HTTPServlet::FileHandler servlet when handling requests for files. This can be exploited to download arbitrary files from the server by sending a specially crafted HTTP request. Successful exploitation requires that the attacker knows the exact path of the file to be downloaded.