exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

dotclear 2.8.1 Shell Upload

dotclear 2.8.1 Shell Upload
Posted Nov 16, 2015
Authored by Tim Coen | Site curesec.com

dotclear version 2.8.1 suffers from a remote shell upload vulnerability.

tags | exploit, remote, shell
SHA-256 | 397c80d12c7ffdf3b32fe5dd2b3fa36c21b9925303a3b7d37c9acb21df26bc19

dotclear 2.8.1 Shell Upload

Change Mirror Download
Security Advisory - Curesec Research Team

1. Introduction

Affected Product: dotclear 2.8.1
Fixed in: 2.8.2
Fixed Version Link: http://download.dotclear.org/latest.zip
Vendor Website: http://dotclear.org/
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/class.dc.media.php
$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:

http://download.dotclear.org/latest.zip

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:
http://blog.curesec.com/article/blog/dotclear-281-Code-Execution-93.html


Login or Register to add favorites

File Archive:

August 2022

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    20 Files
  • 2
    Aug 2nd
    4 Files
  • 3
    Aug 3rd
    6 Files
  • 4
    Aug 4th
    55 Files
  • 5
    Aug 5th
    16 Files
  • 6
    Aug 6th
    0 Files
  • 7
    Aug 7th
    0 Files
  • 8
    Aug 8th
    13 Files
  • 9
    Aug 9th
    13 Files
  • 10
    Aug 10th
    34 Files
  • 11
    Aug 11th
    16 Files
  • 12
    Aug 12th
    5 Files
  • 13
    Aug 13th
    0 Files
  • 14
    Aug 14th
    0 Files
  • 15
    Aug 15th
    25 Files
  • 16
    Aug 16th
    0 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Hosting By
Rokasec
close