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:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close