<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>102145</bug_id>
          
          <creation_ts>2005-08-11 11:09 0000</creation_ts>
          <short_desc>net-www/awstats ShowInfoURL Remote Command Execution Vulnerability (CAN-2005-1527)</short_desc>
          <delta_ts>2005-08-26 06:09:10 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Security</product>
          <component>Vulnerabilities</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://www.idefense.com/application/poi/display?id=290&amp;type=vulnerabilities&amp;flashstatus=false</bug_file_loc>
          <status_whiteboard>B1? [glsa]</status_whiteboard>
          
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>jaervosz@gentoo.org</reporter>
          <assigned_to>security@gentoo.org</assigned_to>
          <cc>frederic.mangeant@gmail.com</cc>
    
    <cc>ka0ttic@gentoo.org</cc>
    
    <cc>rockoo@gmail.com</cc>
    
    <cc>web-apps@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2005-08-11 11:09:47 0000</bug_when>
            <thetext>II. DESCRIPTION 
 
Remote exploitation of an input validation vulnerability in AWStats  
allows remote attackers to execute arbitrary commands. 
AWStats is a logfile analysis tool that generates reports for ftp, mail  
and web traffic. The problem specifically exists because of  
insufficient input filtering before passing user-supplied data to an  
eval() function. As part of the statistics reporting function, AWStats  
displays information about the most common referrer values that caused  
users to visit the website. The referrer data is used without proper  
sanitation in an eval() statement, resulting in the execution of  
arbitrary perl code. 
Shown as follows, the $url parameter contains unfiltered user-supplied  
data that is used in a call to the Perl routine eval() on lines 4841  
and 4842 of awstats.pl (version 6.4): 
     my $function=&quot;ShowInfoURL_$pluginname(&apos;$url&apos;)&quot;; 
     eval(&quot;$function&quot;); 
The malicious referrer value will be included in the referrer  
statistics portion of the AWStats report after AWStats has been run to  
generate a new report including the tainted data. Once a user visits  
the referrer statistics page, the injected perl code will execute with  
permissions of the web service. 
 
III. ANALYSIS 
 
Successful exploitation results in the execution of arbitrary commands  
with permissions of the web service. Exploitation will not occur until  
the stats page has been regenerated with the tainted referrer values  
from the http access log. Note that AWStats is only vulnerable in  
situations where at least one URLPlugin is enabled. 
AWStats is a very commonly used web statistics reporting package. Since  
this attack does not require special privileges, it is recommended that  
users update AWStats to the latest available package. 
 
IV. DETECTION 
 
iDEFENSE Labs has confirmed the existence of this vulnerability in  
AWStats 6.4. All earlier versions are suspected vulnerable. AWStats 6.5  
has been released since the initial research on this vulnerability.  
AWStats 6.5 has replaced all eval() statements, and has mitigated the  
exposure to this vulnerability.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2005-08-11 11:11:45 0000</bug_when>
            <thetext>web-apps please advise and bump as necessary. </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ka0ttic@gentoo.org</who>
            <bug_when>2005-08-12 10:05:10 0000</bug_when>
            <thetext>6.5 in cvs, x86 stable.  ppc when you stable, if you can, please remove the
vulnerable ebuilds (6.3-r2 and 6.4).  Thanks.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-08-12 10:40:12 0000</bug_when>
            <thetext>In fact this could be considered B2 as it&apos;s a passive attack. But since logs
generation is often automatized... I don&apos;t know :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hansmi@gentoo.org</who>
            <bug_when>2005-08-13 00:28:26 0000</bug_when>
            <thetext>Stable on ppc.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2005-08-15 22:23:52 0000</bug_when>
            <thetext>GLSA 200508-07 </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>frederic.mangeant@gmail.com</who>
            <bug_when>2005-08-26 05:07:49 0000</bug_when>
            <thetext>Hi

it looks like AWStats 6.5 is not out yet, I&apos;ve just received this from the author :

&quot;AWStats 6.5 Beta is ready

This new version is not ready for a production use. It is just a beta
release. AWStats 6.5 beta contains bug fixes and new features&quot;</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-08-26 05:58:29 0000</bug_when>
            <thetext>Yes, this is quite confusing. Apparently upstream uses the same versioning for
alphas, betas and releases...

ka0ttic, comments ?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ka0ttic@gentoo.org</who>
            <bug_when>2005-08-26 06:09:10 0000</bug_when>
            <thetext>if he doesnt want it used in production then he needs to push the security
updates to a stable release.  this is rediculous IMO.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>