Bug 740926 - awstats: multiple flaws in awredir.pl
Summary: awstats: multiple flaws in awredir.pl
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 740927 740928
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-23 19:47 UTC by Vincent Danen
Modified: 2019-09-29 12:47 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-08-19 18:57:42 UTC
Embargoed:


Attachments (Terms of Use)

Description Vincent Danen 2011-09-23 19:47:30 UTC
Multiple flaws were reported [1],[2] in current versions of AWStats' awredir.pl script:

URL redirection abuse:
    http://site/awredir.pl?key=0f3830803a70cc1636af3548b66ed978&url=http://websecurity.com.ua

SQL injection flaw (only if $TRACEBASE is enabled and DBI is included):
    http://site/awredir.pl?key=f38ed1cdb04c8bda5386f7755a4e1d3e&url='%20and%20benchmark(10000,md5(now()))/*

XSS flaws:
    http://site/awredir.pl?url=%3Cscript%3Ealert(document.cookie)%3C/script%3E
    http://site/awredir.pl?key=%3Cscript%3Ealert(document.cookie)%3C/script%3E

HTTP Response Splitting flaw:
    http://site/awredir.pl?key=04ed5362e853c72ca275818a7c0c5857&url=%0AHeader:1

CRLF Injection flaw (injection in logs is possible if $DEBUG and/or $TRACEFILE are enabled):
    http://site/awredir.pl?key=4b9faa91e2529400c4f3c70833b4e4a5&url=%0AText


Out of the above flaws, I believe that only the XSS flaws are feasible to abuse, as an attacker would need to know the value of $KEYFORMD5, which is defined in awredir.pl (the key generated is a md5_hash() of the $KEYFORMD5 and the URL to redirect to, although $KEYFORMD5 can be left blank (although there are notes in the script itself about a blank value being a security risk)).

Upstream does not yet have a fix available or in CVS [3].


[1] http://seclists.org/fulldisclosure/2011/Sep/234
[2] http://websecurity.com.ua/5380/
[3] http://awstats.cvs.sourceforge.net/viewvc/awstats/awstats/wwwroot/cgi-bin/

Comment 1 Vincent Danen 2011-09-23 19:48:34 UTC
Created awstats tracking bugs for this issue

Affects: fedora-all [bug 740927]
Affects: epel-all [bug 740928]

Comment 2 Tim Jackson 2011-09-27 07:02:09 UTC
There is possibly a fix (log: "Sanitize parameters" - looks like fix for the XSS flaws) in awredir.pl from 2011-09-24 :
http://awstats.cvs.sourceforge.net/viewvc/awstats/awstats/wwwroot/cgi-bin/awredir.pl?r1=1.13&r2=1.14

Comment 3 Jan Lieskovsky 2011-10-07 08:18:42 UTC
CVE Request:
[4] http://www.openwall.com/lists/oss-security/2011/10/07/1

Comment 4 Petr Lautrbach 2011-10-07 08:48:46 UTC
(In reply to comment #0)
> URL redirection abuse:
>    
> http://site/awredir.pl?key=0f3830803a70cc1636af3548b66ed978&url=http://websecurity.com.ua

awredir.pl is url redirector so this is its main/only feature and it is/can be secured by $KEYFORMD5. So I don't think this is flaw.

Comment 5 Fedora Update System 2011-10-18 22:11:32 UTC
awstats-7.0-4.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2011-10-18 22:16:43 UTC
awstats-7.0-5.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2011-10-19 04:27:23 UTC
awstats-7.0-5.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2011-10-27 19:06:41 UTC
awstats-7.0-2.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2011-12-12 19:27:13 UTC
awstats-6.95-3.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Tim Jackson 2012-08-18 17:22:28 UTC
Since all branches got a fix, looks like this bug should be closed now


Note You need to log in before you can comment on or make changes to this bug.