####################################################################### Luigi Auriemma Application: Ruby http://www.ruby-lang.org Versions: <= 1.9.0 and current CVS Platforms: file system dependent (FAT16/32, NTFS and so on) Bug: CGI source disclosure in WEBrick Exploitation: remote Date: 15 Apr 2008 Author: Luigi Auriemma e-mail: aluigi@autistici.org web: aluigi.org ####################################################################### 1) Introduction 2) Bug 3) The Code 4) Fix ####################################################################### =============== 1) Introduction =============== WEBrick is a class of the Ruby language for building web servlets in some lines of code. ####################################################################### ====== 2) Bug ====== Due to the features of some file systems is possible to download the Ruby CGIs instead of executing them simply appending some chars to the URL like +, %2b, ., %2e, %20. The dot char has been successfully tested on both Windows and Linux (using FAT32/NTFS). Don't seem to exist other effects or bypasses exploitable through these additional chars. ####################################################################### =========== 3) The Code =========== http://SERVER/file.cgi. http://SERVER/file.cgi%2e ####################################################################### ====== 4) Fix ====== No fix #######################################################################