|
|
|
|
| |
| 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 Ruby WEBrick HTTPd server has been found to contain a directory traversal security vulnerability. |
| |
Credit:
The information has been provided by Alexandr Polyakov.
|
| |
Vulnerable Systems:
* Ruby version 1.8.4 and all prior versions
* Ruby version 1.8.5-p114 and all prior versions
* Ruby version 1.8.6-p113 and all prior versions
* Ruby version 1.9.0-1 and all prior version
Immune Systems:
* Ruby version 1.8.5-p115
* Ruby version 1.9.0-2
The following programs are vulnerable:
* Programs that publish files using WEBrick::HTTPServer.new with the :DocumentRoot option
* Programs that publish files using WEBrick::HTTPServlet::FileHandler
Affected systems are:
1. Systems that accept backslash (\) as a path separator, such as Windows.
2. Systems that use case insensitive filesystems such as NTFS on Windows, HFS on Mac OS X.
This vulnerability has the following impacts.
1. Attacker can access private files by sending a URL with URL encoded backslash (\). This exploit works only on systems that accept backslash as a path separator.
Example:
http://[server]:[port]/..%5c..%5c..%5c..%5c..%5c..%5c..%5c..%5c..%5c..%5c/boot.ini
2. Attacker can access files that matches to the patterns specified by the :NondisclosureName option (the default value is [".ht*", "*~"]). This exploit works only on systems that use case insensitive filesystems.
Solution:
The vendor has release patches to address this vulnerability, more details can be found here:
File access vulnerability of WEBrick
|
|
|
|
|
|
|
|
|
|