[KIS-2015-02] Concrete5 <= 5.7.3.1 Multiple Reflected Cross-Site Scripting Vulnerabilities

2015-06-14T00:00:00
ID SECURITYVULNS:DOC:32223
Type securityvulns
Reporter Securityvulns
Modified 2015-06-14T00:00:00

Description


Concrete5 <= 5.7.3.1 Multiple Reflected Cross-Site Scripting Vulnerabilities

[-] Software Link:

https://www.concrete5.org/

[-] Affected Versions:

Version 5.7.3.1 and probably other versions.

[-] Vulnerabilities Description:

1) The vulnerable code is located in /concrete/views/panels/details/page/versions.php:

  1. <? foreach($_REQUEST['cvID'] as $cvID) {
  2. $tabs[] = array('view-version-' . $cvID, t('Version %s', $cvID), $checked);
  3. $checked = false;
  4. }
  5. print $ih->tabs($tabs);
  6. foreach($_REQUEST['cvID'] as $cvID) { ?>
  7. <div id="ccm-tab-content-view-version-<?=$cvID?>" style="display: <?=$display?>; ...
  8. ... &amp;cID=<?=$_REQUEST['cID']?>" />

User input passed through the "cvID" and "cID" request parameters is not properly sanitized before being used to generate HTML output at lines 6 and 13. This can be exploited to conduct reflected Cross-Site Scripting (XSS) attacks.

2) The vulnerable code is located in /concrete/src/Form/Service/Widget/UserSelector.php:

  1. public function selectUser($fieldName, $uID = false, $javascriptFunc = 'ccm_triggerSelectUser') {
  2. $selectedUID = 0;
  3. if (isset($_REQUEST[$fieldName])) {
  4. $selectedUID = $_REQUEST[$fieldName];
  5. } else if ($uID > 0) {
  6. $selectedUID = $uID;
  7. }
  8. $html = '';
  9. $html .= '<div class="ccm-summary-selected-item"><div class="ccm-summary-selected-item-inner"> ...
  10. if ($selectedUID > 0) {
  11. $ui = UserInfo::getByID($selectedUID);
  12. $html .= $ui->getUserName();
  13. }
  14. $html .= '</strong></div>';
  15. $identifier = new \Concrete\Core\Utility\Service\Identifier();
  16. $selector = $identifier->getString(32);
  17. $html .= '<a class="ccm-sitemap-select-item" data-form-user-selector="' . $selector ...
  18. ... name="' . $fieldName . '" value="' . $selectedUID . '">';
  19. $html .= '</div>';

User input passed through the "uID" request parameter is not properly sanitized before being used to generate HTML output at line 35. This can be exploited to conduct reflected Cross-Site Scripting (XSS) attacks.

3) The vulnerable code is located in /concrete/elements/group/search.php:

  1. $searchRequest = $_REQUEST;
  2. $result = Loader::helper('json')->encode($controller->getSearchResultObject()->getJSONObject());
  3. $tree = GroupTree::get();
  4. $guestGroupNode = GroupTreeNode::getTreeNodeByGroupID(GUEST_GROUP_ID);
  5. $registeredGroupNode = GroupTreeNode::getTreeNodeByGroupID(REGISTERED_GROUP_ID);
  6. ?>
  7. <style type="text/css">
  8. div[data-search=groups] form.ccm-search-fields {
  9. margin-left: 0px !important;
  10. }
  11. </style>
  12. <div data-search="groups">
  13. <script type="text/template" data-template="search-form">
  14. <form role="form" data-search-form="groups" action="<?=URL::to('/ccm/system/search/groups/submit')?>" ...
  15. <input type="hidden" name="filter" value="<?php echo $searchRequest['filter']?>" />

User input passed through the "filter" request parameter is not properly sanitized before being used to generate HTML output at line 20. This can be exploited to conduct reflected Cross-Site Scripting (XSS) attacks.

4) User input passed through the "msCountry" POST parameter to /index.php/dashboard/system/multilingual/setup/load_icon is not properly sanitized before being used to generate HTML output. This can be exploited to conduct reflected Cross-Site Scripting (XSS) attacks.

5) User input passed through the "pageURL" POST parameter to /index.php/dashboard/pages/single is not properly sanitized before being used to generate HTML output. This can be exploited to conduct reflected Cross-Site Scripting (XSS) attacks.

6) The vulnerable code is located in /concrete/attributes/select/form.php:

  1. $vals = $this->post('atSelectNewOption');
  2. if (is_array($vals)) {
  3. foreach($vals as $v) { ?>
  4. <div class="newAttrValue">
  5. <?=$form->hidden($this->field('atSelectNewOption') . '[]', $v)?>
  6. <span class="badge"><?php echo $v?></span>

User input passed through the "atSelectNewOption" POST parameter is not properly sanitized before being used to generate HTML output at line 60. This can be exploited to conduct reflected Cross-Site Scripting (XSS) attacks.

[-] Solution:

Update to version 5.7.4 or later.

[-] Disclosure Timeline:

[05/05/2015] - Vulnerabilities details sent through HackerOne [05/05/2015] - Vendor said that two vulnerabilities were already fixed in development [07/05/2015] - Version 5.7.4 released along with the patch for these vulnerabilities [06/06/2015] - Vulnerabilities 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 these vulnerabilities yet.

[-] Credits:

Vulnerabilities discovered by Egidio Romano of Minded Security.

[-] Original Advisory:

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

[-] Other References:

https://hackerone.com/reports/59661