Lucene search

K
securityvulnsSecurityvulnsSECURITYVULNS:DOC:31584
HistoryJan 02, 2015 - 12:00 a.m.

[KIS-2014-16] Osclass <= 3.4.2 (contact.php) Unrestricted File Upload Vulnerability

2015-01-0200:00:00
vulners.com
57

Osclass <= 3.4.2 (contact.php) Unrestricted File Upload Vulnerability

[-] Software Link:

http://osclass.org/

[-] Affected Versions:

Version 3.4.2 and probably prior versions.

[-] Vulnerability Description:

The vulnerable code is located in the /oc-includes/osclass/controller/contact.php script:

  1.      if&#40; osc_contact_attachment&#40;&#41; &#41; {
    
  2.          $attachment   = Params::getFiles&#40;&#39;attachment&#39;&#41;;
    
  3.          if&#40;isset&#40;$attachment[&#39;tmp_name&#39;]&#41;&#41; {
    
  4.                 $resourceName = $attachment[&#39;name&#39;];
    
  5.                 $tmpName      = $attachment[&#39;tmp_name&#39;];
    
  6.                 $resourceType = $attachment[&#39;type&#39;];
    
  7.                 $path = osc_uploads_path&#40;&#41; . time&#40;&#41; . &#39;_&#39; . $resourceName;
    
  8.                 if&#40; !is_writable&#40;osc_uploads_path&#40;&#41;&#41; &#41; {
    
  9.                     osc_add_flash_error_message&#40; _m&#40;&#39;There have been some errors ...
    
  10.                     $this-&gt;redirectTo&#40; osc_contact_url&#40;&#41; &#41;;
    
  11.                 }
    
  12.                 if&#40; !move_uploaded_file&#40;$tmpName, $path&#41; &#41; {
    
  13.                     unset&#40;$path&#41;;
    
  14.                 }
    
  15.             }
    
  16.         }
    

The vulnerability exists because of the "CWebContact::doModel()" method not properly verifying the
extension of uploaded files. This could be exploited by unauthenticated attackers to upload and
execute arbitrary PHP code. Successful exploitation of this vulnerability requires the attachment
option for the contact page to be enabled (disabled by default).

[-] Solution:

Update to version 3.4.3 or later.

[-] Disclosure Timeline:

[30/09/2014] - Vendor notified
[30/09/2014] - Vendor response
[09/10/2014] - Version 3.4.3 released: http://blog.osclass.org/2014/10/09/osclass-3-4-3
[09/10/2014] - CVE number requested
[11/10/2014] - CVE number assigned
[31/12/2014] - Public disclosure

[-] CVE Reference:

The Common Vulnerabilities and Exposures project (cve.mitre.org)
has assigned the name CVE-2014-8085 to this vulnerability.

[-] Credits:

Vulnerability discovered by Egidio Romano.

[-] Original Advisory:

http://karmainsecurity.com/KIS-2014-16

Related for SECURITYVULNS:DOC:31584