FreeWebshop <= 2.2.9 R2 (ajax_save_name.php) Remote Code Execution Vulnerability
authorโฆ: Egidio Romano aka EgiX
mailโฆ: n0b0d13s[at]gmail[dot]com
software linkโฆ: http://www.freewebshop.org/
affected versionsโฆ: from 0.9.12 to 2.2.3
[-] vulnerable code in /addons/tinymce/jscripts/tiny_mce/plugins/ajaxfilemanager/ajax_save_name.php
An attacker could be able to manipulate the $selectedDocuments array that will be displayed at line 50,
then at line 56 is called the 'writeInfo' function using the current buffer contents as argument.
Like my recently discovered vulnerability (http://www.exploit-db.com/exploits/18075/), this function
writes into a file called 'data.php' so an attacker could be able to execute arbitrary PHP code.
[-] Disclosure timeline:
[24/11/2011] - Vulnerability discovered
[25/10/2011] - Issue reported to http://www.freewebshop.org/forum/?topic=5235
[15/11/2011] - After three weeks still no fix released
[16/11/2011] - Public disclosure
[-] Proof of concept: