Home page logo

bugtraq logo Bugtraq mailing list archives

ECHU.ORG Alert #4: GuppY makes XSS attacks easy
From: "David Suzanne" <das () echu org>
Date: Mon, 29 Sep 2003 5:23:25 +0100

| GuppY makes XSS attacks easy |

VULNERABLE VERSIONS: All versions under 2.4p1

Tested version
GuppY 2.4 on the official GuppY website.

"GuppY is a small web portal, meant to be easy to use for the end user that you are, and which does not require a 
database to run.This architecture allows then to install it on almost all Internet web sites hosters (or almost all of 
them), the only preriquisite being that your hoster has to provide the PHP scripting language facility." - GuppY website

GuppY use the postguest.php file for its forum and guestbook modules. This file contain XSS holes, an attacker can 
execute code since [c=codecolor]text[/c] has no filter.

Problems come from this part:

Line 196: $ptxt = preg_replace("/(\[c=(.*?)\])(.*?)(\[\/c\])/i", "<font style=\"color:\\2\">\\3</font>",$ptxt);
Line 197: $ptxt = preg_replace("/(\[c=(.*?)\])(.*?)(\[\/C\])/i", "<font style=\"color:\\2\">\\3</font>",$ptxt);
Line 198: $ptxt = preg_replace("/(\[C=(.*?)\])(.*?)(\[\/c\])/i", "<font style=\"color:\\2\">\\3</font>",$ptxt);
Line 199: $ptxt = preg_replace("/(\[C=(.*?)\])(.*?)(\[\/C\])/i", "<font style=\"color:\\2\">\\3</font>",$ptxt);

A badly disposed member can post a message containing code really easily in forum and guestbook modules. Example:
(This proof-of-concept will show a window that can freeze your computer if using Internet Explorer so take care)


In order to avoid the vulnerability, add a filter that will block ;<>*()"'] caracters to lines 196 to 199:

Line 196: $ptxt = preg_replace("/(\[c=([#a-zA-Z0-9]*)\])(.*?)(\[\/c\])/i", "<font 
Line 197: $ptxt = preg_replace("/(\[c=([#a-zA-Z0-9]*)\])(.*?)(\[\/C\])/i", "<font 
Line 198: $ptxt = preg_replace("/(\[C=([#a-zA-Z0-9]*)\])(.*?)(\[\/c\])/i", "<font 
Line 199: $ptxt = preg_replace("/(\[C=([#a-zA-Z0-9]*)\])(.*?)(\[\/C\])/i", "<font 

Vendor status
GuppY developper's team has been contacted, a patch has been released tonight that fix the problem. Thanks to aldweb 
(freeguppy.org webmaster) for his quick answer.

GuppY: http://www.freeguppy.org
Patch: http://www.freeguppy.org/file/guppy_patch2.zip
Version 2.4p1: http://www.freeguppy.org/file/guppy.zip

This vulnerability's orginal paper can be found here: http://www.echu.org/articles/alertes/echu-alert4.txt

David Suzanne (dAs)

ECHU.ORG is not responsible for the misuse of the information we 
provide through our security advisories. These advisories are a 
service to the professional security community. In no event shall 
ECHU.ORG be liable for any consequences whatsoever arising out of 
or in connection with the use or spread of this information.

  By Date           By Thread  

Current thread:
  • ECHU.ORG Alert #4: GuppY makes XSS attacks easy David Suzanne (Sep 29)
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]