-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

===========================================================================
             AUSCERT External Security Bulletin Redistribution

                    ESB-2009.0436 -- [Win][UNIX/Linux]
                Jetty HTTP server: Access Confidential Data
                                5 May 2009

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

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:              Jetty HTTP server
Publisher:            US-CERT
Operating System:     UNIX variants (UNIX, Linux, OSX)
                      Windows
Impact:               Inappropriate Access
Access:               Remote/Unauthenticated

Original Bulletin:    http://www.kb.cert.org/vuls/id/402580

- --------------------------BEGIN INCLUDED TEXT--------------------

Vulnerability Note VU#402580
Jetty HTTP server directory traversal vulnerability

Overview

A vulnerability in the Jetty HTTP server could allow a remote attacker to 
gain access to files outside of the normal document tree.

I. Description

Jetty provides an HTTP server, HTTP client, and javax.servlet container. An 
error in the way canonical paths are interpreted in the HTTP server's URI 
handler results in a directory traversal vulnerability. This vulnerability 
affects all versions of Jetty up to and including jetty 6.1.16 and 
7.0.0.M2. In order for a system to be vulnerable, it must either be using 
the DefaultServlet with support for aliases explicitly enabled or the 
ResourceHandler class to serve static content. The vendor reports that 
systems running Jetty on Unix-like operating systems must also contain a 
directory name ending a '?' character in the web application or document 
root in order to be vulnerable.

II. Impact

A remote attacker can access files outside of the web application or 
document root by supplying a crafted URL to an vulnerable system.

III. Solution

Upgrade or apply a patch from the vendor

Jetty version 6.1.17 has been published to address this vulnerability. Users 
are encouraged to upgrade to this version.

The vendor has described the following workarounds for users who are unable 
to update their software:

      If you are not using the ResourceHandler, then you should
      confirm that your jetty instance is running with
      the Default servlet "aliases" initParam set to "false".
      You will find this setting in either your application's
      web.xml or the etc/webdefault.xml. If it is not set,
      then it takes the default, safe, value of "false".
      You should also check that the 
      org.mortbay.util.FileResource.checkAliases
      system property is either not set, or set to true.

      If you are using the ResourceHandler, then you can secure your
      system against this vulnerability by compiling the source
      at the bottom of this message against the version of Jetty
      that you are using.  Use an instance of this class instead
      of the ResourceHandler


      package org.mortbay.jetty.cert;
      import java.net.MalformedURLException;
      import org.mortbay.jetty.handler.ResourceHandler;
      import org.mortbay.resource.Resource;
      import org.mortbay.util.StringUtil;
      import org.mortbay.util.URIUtil;
      public class TempFixResourceHandler extends ResourceHandler
      {
          public Resource getResource(String path) throws MalformedURLException
          {
              if (path!=null && path.indexOf('?')>=0)
              {
                  path=URIUtil.decodePath(URIUtil.canonicalPath(StringUtil.replace(path,"?","%3F")));
                  if (path==null)
                      return null;
              }
              return super.getResource(path);
          }
      }

Systems Affected
Systems using Jetty versions 6.1.16 and earlier, and versions 7.0.0M2 and 
earlier.
Vendor	Status	Date Notified	Date Updated
Mort Bay	Vulnerable		2009-05-01
References


http://docs.codehaus.org/display/JETTY/Jetty+Security
http://jira.codehaus.org/browse/JETTY-1004
Credit

Thanks to Greg Wilkins of Mort Bay Consulting for reporting this 
vulnerability.

This document was written by Chad R Dougherty.
Other Information
Date Public:	          2009-04-29
Date First Published:	  2009-05-01
Date Last Updated:	  2009-05-01
CERT Advisory:	 
CVE-ID(s):	 
NVD-ID(s):	 
US-CERT Technical Alerts:	 
Metric:	                  6.60
Document Revision:	  9

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        http://www.auscert.org.au/render.html?cid=1980

If you believe that your computer system has been compromised or attacked in 
any way, we encourage you to let us know by completing the secure National IT 
Incident Reporting Form at:

        http://www.auscert.org.au/render.html?it=3192

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
===========================================================================

-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iD8DBQFJ/7XsNVH5XJJInbgRArbhAJ9BOIZ6mqCkDJY7WNch8RztIyfc2ACcDCIc
uUQed9+w5OpekEHvYVU3saE=
=vfes
-----END PGP SIGNATURE-----