dotclear 2.8.1 Shell Upload

Credit: Curesec
Risk: High
Local: No
Remote: Yes
CWE: CWE-264

Security Advisory - Curesec Research Team 1. Introduction Affected Product: dotclear 2.8.1 Fixed in: 2.8.2 Fixed Version Link: Vendor Website: Vulnerability Type: Code Execution Remote Exploitable: Yes Reported to vendor: 10/02/2015 Disclosed to public: 11/13/2015 Release mode: Coordinated release CVE: n/a Credits Tim Coen of Curesec GmbH 2. Overview CVSS High 9.0 AV:N/AC:L/Au:S/C:C/I:C/A:C Description While upload of files with extension php, php4, and php5 is forbidden, upload of files with the extension pht, phps, and phtml is allowed, which will lead to code execution with most default Apache configurations. The upload form is located here: http://localhost/dotclear/admin/media.php?popup=1&plugin_id=dcLegacyEditor A user with the right "manage their own media items" and "manage their own entries and comments" is needed to exploit this issue. 3. Code /dotclear/inc/libs/clearbricks/filemanager public function uploadFile($tmp,$dest,$overwrite=false) { $dest = $this->pwd.'/'.path::clean($dest); if ($this->isFileExclude($dest)) { throw new Exception(__('Uploading this file is not allowed.')); } [...] if (@move_uploaded_file($tmp,$dest) === false) { throw new Exception(__('An error occurred while writing the file.')); } [...] } [...] protected function isFileExclude($f) { if (!$this->exclude_pattern) { return false; } return preg_match($this->exclude_pattern,$f); } /dotclear/inc/core/ $this->exclude_pattern = $core->blog->settings->system->media_exclusion; /dotclear/inc/core/class.dc.core.php array('media_exclusion','string','/\.php[0-9]*$/i', 'File name exclusion pattern in media manager. (PCRE value)'), Note that after installation, the regex is retrieved from the settings table of the database, not from the code. 4. Solution To mitigate this issue please upgrade at least to version 2.8.2: Please note that a newer version might already be available. 5. Report Timeline 10/02/2015 Informed Vendor 10/25/2015 Vendor releases fix 11/13/2015 Disclosed to public Blog Reference:

Vote for this issue:


Thanks for you vote!


Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.

(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2019,


Back to Top