Lucene search

K
securityvulnsSecurityvulnsSECURITYVULNS:DOC:32222
HistoryJun 14, 2015 - 12:00 a.m.

[KIS-2015-01] Concrete5 <= 5.7.3.1 (sendmail) Remote Code Execution Vulnerability

2015-06-1400:00:00
vulners.com
214

Concrete5 <= 5.7.3.1 (sendmail) Remote Code Execution Vulnerability

[-] Software Link:

https://www.concrete5.org/

[-] Affected Versions:

Version 5.7.3.1 and probably other versions.

[-] Vulnerability Description:

The vulnerable code is located in /concrete/controllers/single_page/dashboard/system/registration/open.php:

  1. switch ($this->post('registration_type')) {
  2. case &quot;enabled&quot;:
    
  3.     Config::save&#40;&#39;concrete.user.registration.enabled&#39;, true&#41;;
    
  4.     Config::save&#40;&#39;concrete.user.registration.validate_email&#39;, false&#41;;
    
  5.     Config::save&#40;&#39;concrete.user.registration.approval&#39;, false&#41;;
    
  6.     Config::save&#40;&#39;concrete.user.registration.notification&#39;, $this-&gt;post&#40;&#39;register_notification&#39;&#41;&#41;;
    
  7.     Config::save&#40;
    
  8.         &#39;concrete.user.registration.notification_email&#39;,
    
  9.         Loader::helper&#40;&#39;security&#39;&#41;-&gt;sanitizeString&#40;
    
  10.             $this-&gt;post&#40;&#39;register_notification_email&#39;&#41;&#41;&#41;;
    
  11.     break;
    

User input passed through the "register_notification_email" POST parameter is not properly sanitized before
being stored into a configuration setting at lines 27-30 (the sanitizeString() method doesn’t check if it is
a valid email address). This value is used as a sender email address to send out a notification email when a
new user is being registered, and this is done using the PHP mail() function, specifically passing such value
to its fifth parameter. So, when sendmail is used to send out such an email, it is possible to alter the
command line and tell the sendmail program to log all the email traffic in an arbitrary file chosen by the
attacker, resulting in an arbitrary PHP code execution. This vulnerability is mitigated by the fact that it
can be exploited only by authenticated administrator users (even though it could be exploited via a Cross-Site
Request Forgery attack as well) and only if the email is being sent with sendmail.

[-] Solution:

Update to version 5.7.4 or later.

[-] Disclosure Timeline:

[05/05/2015] - Vulnerability details sent through HackerOne
[05/05/2015] - Vendor said a patch has been committed and will be available in the next version
[07/05/2015] - Version 5.7.4 released along with the patch for this vulnerability
[06/06/2015] - Vulnerability publicly disclosed on HackerOne
[11/06/2014] - CVE number requested
[11/06/2014] - Publication of this advisory

[-] CVE Reference:

The Common Vulnerabilities and Exposures project (cve.mitre.org) has not assigned a name to this vulnerability yet.

[-] Credits:

Vulnerability discovered by Egidio Romano of Minded Security.

[-] Original Advisory:

http://karmainsecurity.com/KIS-2015-01

[-] Other References:

https://hackerone.com/reports/59663