what you don't know can hurt you

WordPress Mingle Forum 1.0.32.1 Cross Site Scripting / SQL Injection

WordPress Mingle Forum 1.0.32.1 Cross Site Scripting / SQL Injection
Posted Jan 21, 2012
Authored by Gianluca Brindisi

WordPress Mingle Forum versions 1.0.32.1 and below suffer from cross site scripting and remote SQL injection vulnerabilities.

tags | exploit, remote, vulnerability, xss, sql injection
MD5 | 8d175983ef6e7033f2e90ae707b43c03

WordPress Mingle Forum 1.0.32.1 Cross Site Scripting / SQL Injection

Change Mirror Download
# Exploit Title: Wordpress Mingle Forum plugin <= 1.0.32.1 Multiple Vulnerabilities
# Date: 2012/01/18
# Author: Gianluca Brindisi (gATbrindi.si @gbrindisi http://brindi.si/g/)
# Software Link: http://downloads.wordpress.org/plugin/mingle-forum.1.0.32.1.zip
# Version: 1.0.32.1

You need an authenticated session to exploit the following vulnerabilities.

2) SQL Injection:
POST: admin.php?page=mfgroups&mingleforum_Action=usergroups
delete_usergroups: Delete
dele_usrgrp%5B%5D: 1 [SQLI]

Vulnerable code:

function delete_usergroups(){
if (isset($_POST['delete_usergroups'])){
global $wpdb, $table_prefix;
$delete_usrgrp = $_POST['delete_usrgrp'];
$groups = "";
$count = count($delete_usrgrp);
for($i = 0; $i < $count; $i++){
$wpdb->query("DELETE FROM ".$table_prefix."forum_usergroups WHERE id = {$delete_usrgrp[$i]}");
$wpdb->query("DELETE FROM ".$table_prefix."forum_usergroup2user WHERE `group` = {$delete_usrgrp[$i]}");
}
return true;
}
return false;

2) SQL Injection:
POST: admin.php?page=mfgroups&mingleforum_action=usergroups&do=add_user_togroup togroupusers: users
usergroup: bar [SQLI]
add_user_togroup: Add+users

Vulnerable code:

$group = $_POST['usergroup'];
---
$msg = __("User", "mingleforum")." \"$user\" ".__("added successfully", "mingleforum")."<br />";
$sql = "INSERT INTO ".$table_prefix."forum_usergroup2user (user_id, `group`) VALUES('$id', '$group')";
$wpdb->query($sql);
++$added;

2) Stored XSS:
admin.php?page=mingle-forum

Some options are not escaped so you can inject a payload in the admin interface.
Notice that every option is passed trough update_option() before being saved in
the db so no sqli here

Vulnerable code:

'forum_posts_per_page' => $wpdb->escape($_POST['forum_posts_per_page']),
'forum_threads_per_page' => $wpdb->escape($_POST['forum_threads_per_page']),
'forum_require_registration' => $_POST['forum_require_registration'],
'forum_show_login_form' => $_POST['forum_show_login_form'],
'forum_date_format' => $wpdb->escape($_POST['forum_date_format']),
'forum_use_gravatar' => $_POST['forum_use_gravatar'],
'forum_show_bio' => $_POST['forum_show_bio'],
'forum_skin' => $op['forum_skin'],
'forum_use_rss' => $_POST['forum_use_rss'],
'forum_use_seo_friendly_urls' => $_POST['forum_use_seo_friendly_urls'],
'forum_allow_image_uploads' => $_POST['forum_allow_image_uploads'],
'notify_admin_on_new_posts' => $_POST['notify_admin_on_new_posts'],
'set_sort' => $op['set_sort'],
'forum_use_spam' => $_POST['forum_use_spam'],
'forum_use_bbcode' => $_POST['forum_use_bbcode'],
'forum_captcha' => $_POST['forum_captcha'],
'hot_topic' => $_POST['hot_topic'],
'veryhot_topic' => $_POST['veryhot_topic'],
'forum_display_name' => $_POST['forum_display_name'],
'level_one' => $_POST['level_one'],
'level_two' => $_POST['level_two'],
'level_three' => $_POST['level_three'],
'level_newb_name' => $_POST['level_newb_name'],
'level_one_name' => $_POST['level_one_name'],
'level_two_name' => $_POST['level_two_name'],
'level_three_name' => $_POST['level_three_name'],
'forum_db_version' => $op['forum_db_version'],
'forum_disabled_cats' => explode(",",$_POST['forum_disabled_cats'])

3) Stored XSS and SQLI:
admin.php?page=mfstructure

Adding a new forum both name and description fields are not sanitized so
stored xss payload in admin interface AND forum pages is possible.
They are escaped only for sqli except for add_forum_group_id which is exploitable

Vulnerable code:

$add_forum_description = $wpdb->escape($_POST['add_forum_description']);
$add_forum_name = $wpdb->escape($_POST['add_forum_name']);
$add_forum_group_id = $_POST['add_forum_group_id'];
---
$wpdb->query("INSERT INTO ".$table_prefix."forum_forums (name, description, parent_id, sort)
VALUES('$add_forum_name', '$add_forum_description', '$add_forum_group_id', '$max')");

4) Stored XSS:
admin.php?page=mfads

Every textarea input is not sanitized and can lead to stored xss payloads in admin interface
and forums pages (this is somehow intended behavior since HTML is allowed but still...)
i.e: "></textarea>[XSS]

Vulnerable code:

'mf_ad_above_forum_on' => $_POST['mf_ad_above_forum_on'],
'mf_ad_above_forum' => $_POST['mf_ad_above_forum_text'],
'mf_ad_below_forum_on' => $_POST['mf_ad_below_forum_on'],
'mf_ad_below_forum' => $_POST['mf_ad_below_forum_text'],
'mf_ad_above_branding_on' => $_POST['mf_ad_above_branding_on'],
'mf_ad_above_branding' => $_POST['mf_ad_above_branding_text'],
'mf_ad_above_info_center_on' => $_POST['mf_ad_above_info_center_on'],
'mf_ad_above_info_center' => $_POST['mf_ad_above_info_center_text'],
'mf_ad_above_quick_reply_on' => $_POST['mf_ad_above_quick_reply_on'],
'mf_ad_above_quick_reply' => $_POST['mf_ad_above_quick_reply_text'],
'mf_ad_above_breadcrumbs_on' => $_POST['mf_ad_above_breadcrumbs_on'],
'mf_ad_above_breadcrumbs' => $_POST['mf_ad_above_breadcrumbs_text'],
'mf_ad_below_first_post_on' => $_POST['mf_ad_below_first_post_on'],
'mf_ad_below_first_post' => $_POST['mf_ad_below_first_post_text'],
'mf_ad_custom_css' => $_POST['mf_ad_custom_css']

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

October 2019

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2019 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close