[PATCH] PHP Image Gallery „action“ Cross-Site Scripting Vulnerability
On Secunia: PHP Image Gallery „action“ Cross-Site Scripting Vulnerabilityhttp://secunia.com/advisories/30573/
A possible solution until a patch is available is to use SEQ_SANITIZE from seq_lib. With the described method
none of the found security flaws can be used for an attack.
[B]This is not an official patch! Test this patch before using it in productive environments! As soon as an official patch is released, use it![/B]
1. Download seq_lib 0.4.
2. Upload seq_lib on the server.
3. Configure the seq_lib-path (if not standard).
4. Include seq_lib in „index.php“.
5. Call SEQ_SANITIZE:
[B]SEQ_SANITIZE – Variable list with expected properties:[/B]
// VARIABLE NAME # SOURCE# TYPE # MIN # MAX # XSS &
$sanitizer = ' action # pg # STR # # # true &';
[B]SEQ_SANITIZE – Description:[/B]
SOURCE: p=POST g=GET s=SESSION c=COOKIE (REQUEST is always sanitized)
TYPE: integer,float=INT string=STR
MIN: integer,float: minimal number | string: minimal length
MAX: integer,float: maximal number | string: maximal length
XSS: true=perform xss-prevention
The list of variables which must be sanitized can be extended by adding more lines. Take care to not forget
the boundary characters between the params (#) and at the end of every line (&). In case you do, please send me a copy
to help other user also get secure.