[NEWS] Mephistoles HTTPd Cross Site Scripting Vulnerability

From: SecuriTeam (support_at_securiteam.com)
Date: 01/22/04

  • Next message: SecuriTeam: "[NT] 2Wire-Gateway Cross Site Scripting And Directory Transversal Bug In SSL Form"
    To: list@securiteam.com
    Date: 22 Jan 2004 16:54:16 +0200
    
    

    The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
    - - promotion

    The SecuriTeam alerts list - Free, Accurate, Independent.

    Get your security news from a reliable source.
    http://www.securiteam.com/mailinglist.html

    - - - - - - - - -

      Mephistoles HTTPd Cross Site Scripting Vulnerability
    ------------------------------------------------------------------------

    SUMMARY

    "The <http://sourceforge.net/projects/mephistoles> Mephistoles Internet
    Suite includes at present an HTTP server, an FTP server, a DNS caching
    server, an experimental and yet unusable NetBIOS client and a client that
    can (currently) fetch pages via HTTP. All programs were written in PERL
    and are compact."

    The HTTP server that is distributed in this Internet Suite is vulnerable
    to a cross site scripting attack.

    DETAILS

    Vulnerable Systems:
     * Mephistoles HTTPd version 0.6.0 final

    The HTTPd program does not perform filtering on the input strings sent by
    the client and in fact the strings will appear in the returned page.

    A simple way to test this vulnerability:

    http://[host]/< A_SCRIPT>

    Example:

    http://[host]/< script>alert("Test")< /script>

    Vendor Status:
    The vendor has been contacted and a new release of Mephistoles HTTPd is in
    the making.

    Patch Availability:
    In the meantime, a small patch by Donato can be applied that fixes the
    issue in version 0.6.0 final.

    --- mephistoles-httpd-0.6.0final-noarch.pl 2004-01-21 12:16:34.000000000
    +0100
    +++ patch.pl 2004-01-21 12:25:56.000000000 +0100
    @@ -205,7 +205,7 @@
     my $ic;

     if (opendir(DIR,$trdr.$public)) { } else {
    - serr(404,$page);
    + serr(404,"");
     return;
     }

    @@ -389,13 +389,13 @@
     $page=conv($page); # convert $page from %XX-encoding to plain ASCII

     if (evilhacker($page)) { # illegal filename
    - serr(403,$page);
    + serr(403,"");
     return;
     }

     if (($cgiholes==1) && (defined $getstr)) { # minimal protection for bad
    cgi-scripts!
     if (evilhacker($getstr)) {
    - serr(403,$page);
    + serr(403,"");
      return;
     }
     }
    @@ -411,7 +411,7 @@
       $trdr="/root/public_html/";
       $trp=$2;
      } else {
    - serr(403,$page);
    + serr(403,"");
      }
      } else {
      $page =~ /^\/\~(.+?)\/(.*?)$/g;
    @@ -449,11 +449,11 @@
     if ($reqt==2) { # POST-requests
     $ENV{"REQUEST_METHOD"}="POST";
     if ($postreq==0) {
    - serr(403,"$page");
    + serr(403,"");
     } else {
      if ($postreq==1) {
      if (iscgi($trp)) {
    - serr(403,"$page");
    + serr(403,"");
       return;
      }
      }
    @@ -495,7 +495,7 @@
     $ENV{"REQUEST_METHOD"}="GET";

     if (!(-e $trdr.$trp)) {
    - serr(404,$page);
    + serr(404,"");
      return;
     }

    @@ -550,7 +550,7 @@
     }
     close(SRC);
     } else {
    - serr(404,$page);
    + serr(404,"");
     }

    }

    ADDITIONAL INFORMATION

    The information has been provided by <mailto:donato@autistici.org> Donato
    Ferrante

    ========================================

    This bulletin is sent to members of the SecuriTeam mailing list.
    To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
    In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com

    ====================
    ====================

    DISCLAIMER:
    The information in this bulletin is provided "AS IS" without warranty of any kind.
    In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.


  • Next message: SecuriTeam: "[NT] 2Wire-Gateway Cross Site Scripting And Directory Transversal Bug In SSL Form"

    Relevant Pages