Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130487 - net-www/awstats - multiple vulnerabilities (CVE-2006-1945|2237)
Summary: net-www/awstats - multiple vulnerabilities (CVE-2006-1945|2237)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Security
URL: http://pridels.blogspot.com/2006/04/a...
Whiteboard: C1 [glsa] DerCorny
Keywords:
: 130546 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-19 08:42 UTC by Sune Kloppenborg Jeppesen (RETIRED)
Modified: 2006-06-07 12:12 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
awstats-6.5-CVE-2006-2237-CVE-2006-1945.diff (awstats-6.5-CVE-2006-2237-CVE-2006-1945.diff,5.63 KB, patch)
2006-05-27 03:48 UTC, Jakub Moc (RETIRED)
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-04-19 08:42:33 UTC
AWStats contains a flaw that allows a remote cross site scripting attack. This flaw exists because input passed to "config" paremeter in "awstats.pl" isn't properly sanitised before being returned to the user.
This could allow a user to create a specially crafted URL that would execute arbitrary code in a user's browser within the trust relationship between the browser and the server, leading to a loss of integrity.

Also doing XSS vuln. check attacker will get full path disclosure.
Comment 1 Stefan Cornelius (RETIRED) gentoo-dev 2006-04-19 08:51:53 UTC
ka0ttic pls provide new ebuilds, thank you
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-04-20 00:30:58 UTC
*** Bug 130546 has been marked as a duplicate of this bug. ***
Comment 3 Thierry Carrez (RETIRED) gentoo-dev 2006-04-28 12:25:16 UTC
This needs an upstream update or a patch
Comment 4 Carsten Lohrke (RETIRED) gentoo-dev 2006-05-04 04:43:29 UTC
If the update of the stats via web front-end is allowed, a remote attacker can execute arbitrary code on the server using a specially crafted request involving the migrate parameter. Input starting with a pipe character ("|") leads to an insecure call to Perl's open function and the rest of the input being executed in a shell. The code is run in the context of the process running the AWStats CGI. 
Arbitrary code can be executed by uploading a specially crafted configuration file if an attacker can put a file on the server with chosen file name and content (e.g. by using an FTP account on a shared hosting server). In this configuration file, the LogFile directive can be used to execute shell code following a pipe character. As above, an open call on unsanitized input is the source of this vulnerability. 
Furthermore, the cross-site scripting vulnerability described in CVE-2006-1945 also exists with the diricons parameter and possibly others as well.


http://www.osreviews.net/reviews/comm/awstats
Comment 5 Raphael Marichez (Falco) (RETIRED) gentoo-dev 2006-05-05 13:36:25 UTC
Fixed in awstats 6.6
http://awstats.sourceforge.net/awstats_security_news.php

--> [ebuild]

and CVE-2006-1945
Comment 6 Thierry Carrez (RETIRED) gentoo-dev 2006-05-09 09:57:38 UTC
web-apps team please bump since ka0ttic is not responding.
Comment 7 Raphael Marichez (Falco) (RETIRED) gentoo-dev 2006-05-18 14:37:54 UTC
Hi,

sec-team :
please add CVE-2006-2237 to the summary. It concerns the execution of arbitrary code in the migrate parameter pointed out in comment #4 by carlo.

web-apps :
awstats-6.6 is out.
Or, if you prefer, a patch is available from debian : 
http://security.debian.org/pool/updates/main/a/awstats/awstats_6.4-1sarge2.diff.gz
But i think introducing and stabilizing 6.6 is the best choice, since it corrects the other vulns (CVE-2006-1945 particularly)


web-apps, please act ? we're so late... Or, sec-team, we should try to bump an ebuild ourserlves as the policy says.
Comment 8 Stefan Cornelius (RETIRED) gentoo-dev 2006-05-18 16:30:09 UTC
i'd even tend to mask it
Comment 9 Renat Lumpau (RETIRED) gentoo-dev 2006-05-19 05:54:04 UTC
6.6 in CVS
Comment 10 Stefan Cornelius (RETIRED) gentoo-dev 2006-05-19 06:35:34 UTC
arches pls test and stable, thank you
Comment 11 Daniel Gryniewicz (RETIRED) gentoo-dev 2006-05-19 09:51:50 UTC
If 6.5 has a vulnerability, and 6.6 slots, how does that fix 6.5, since it stays on your system and available?  Shouldn't 6.6 replace 6.5?  This way, if people get the upgrade without knowing about the CVE, then they might not switch to the new version...

Anyway, amd64 stable.
Comment 12 Thomas Cort (RETIRED) gentoo-dev 2006-05-19 10:02:50 UTC
alpha done.
Comment 13 Tobias Scherbaum (RETIRED) gentoo-dev 2006-05-19 11:58:57 UTC
ppc stable
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2006-05-19 14:47:52 UTC
(In reply to comment #11)
> If 6.5 has a vulnerability, and 6.6 slots, how does that fix 6.5, since it
> stays on your system and available?  Shouldn't 6.6 replace 6.5? 

Fixed (no revbump), the slotting was indeed broken...
Comment 15 Mark Loeser (RETIRED) gentoo-dev 2006-05-20 21:47:32 UTC
x86 done
Comment 16 Stefan Cornelius (RETIRED) gentoo-dev 2006-05-21 07:20:34 UTC
ready for glsa
Comment 17 matthew.cline 2006-05-23 19:51:38 UTC
regarding #14:

When I try to upgrade to awstats-6.6, portage still wants to slot it:

# emerge -pv awstats

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  NS   ] net-www/awstats-6.6  USE="-vhosts" 0 kB 

Total size of downloads: 0 kB


I think that I have the most recent version of the ebuild:

$ ls -l /usr/portage/net-www/awstats/awstats-6.6.ebuild
-rw-r--r-- 1 root root 4012 May 21 01:08 /usr/portage/net-www/awstats/awstats-6.6.ebuild


What am I doing wrong?
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2006-05-27 03:48:23 UTC
Created attachment 87626 [details, diff]
awstats-6.5-CVE-2006-2237-CVE-2006-1945.diff

OK, since awstats-6.6 is pretty much broken (see Bug 134296) and also not considered stable upstream, I've hacked a 6.5 patch for CVE-2006-2237 and CVE-2006-1945 - based on Debian patches here: http://debian.osuosl.org/debian/pool/main/a/awstats/awstats_6.5-2.diff.gz

Please, test this instead...
Comment 19 Stefan Cornelius (RETIRED) gentoo-dev 2006-05-27 03:53:35 UTC
thanks jakub - back into ebuild status. ka0ttic please revbump 6.5 with the patches applied, thanks
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2006-05-27 04:47:35 UTC
BTW, we should add dev-perl/URI dep (Bug 122913) while fixing this.
Comment 21 Stefan Cornelius (RETIRED) gentoo-dev 2006-05-29 09:26:00 UTC
ok, seems like there is no maintainer and nobody bothers to bump it, so i
masked it since the revbump takes longer than i thought ... will send a mail to
-dev soon, if nobody replies in 24h then we'll probably have to issue a
tempglsa (should've been done looong ago ...)
Comment 22 Luca Longinotti (RETIRED) gentoo-dev 2006-05-30 08:22:35 UTC
net-www/awstats-6.5-r1 was just added to the tree, with jakub's patch included.
Arch teams: keywording time!
Best regards, CHTEKK.
Comment 23 Stefan Cornelius (RETIRED) gentoo-dev 2006-05-30 08:25:32 UTC
arches, please test and mark 6.5-r1 as stable, thanks

a 'thank you' also flies out to jakub and CHTEKK
Comment 24 Joshua Jackson (RETIRED) gentoo-dev 2006-05-30 21:26:47 UTC
x86 done again
Comment 25 Tobias Scherbaum (RETIRED) gentoo-dev 2006-06-01 11:08:35 UTC
ppc stable
Comment 26 Thomas Cort (RETIRED) gentoo-dev 2006-06-01 15:08:00 UTC
awstats-6.5-r1 stable on alpha and amd64.
Comment 27 Stefan Cornelius (RETIRED) gentoo-dev 2006-06-02 06:10:45 UTC
ready for glsa
Comment 28 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-06-07 12:12:36 UTC
GLSA 200606-06