{"vuid":"VU#402580","idnumber":"402580","name":"Jetty HTTP server directory traversal vulnerability","keywords":["DefaultServlet","initParameter","resource handler","document root"],"overview":"A vulnerability in the Jetty HTTP server could allow a remote attacker to gain access to files outside of the normal document tree.","clean_desc":"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.","impact":"A remote attacker can access files outside of the web application or document root by supplying a crafted URL to an vulnerable system.","resolution":"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.","workarounds":"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\nconfirm that your jetty instance is running with\nthe Default servlet \"aliases\" initParam set to \"false\". You will find this setting in either your application's\nweb.xml or the etc/webdefault.xml. If it is not set,\nthen it takes the default, safe, value of \"false\". You should also check that the org.mortbay.util.FileResource.checkAliases\nsystem property is either not set, or set to true. If you are using the ResourceHandler, then you can secure your\nsystem against this vulnerability by compiling the source\nat the bottom of this message against the version of Jetty\nthat you are using. Use an instance of this class instead\nof 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)\n                return null; return super.getResource(path);","sysaffected":"Systems using Jetty versions 6.1.16 and earlier, and versio","thanks":"Thanks to Greg Wilkins of \nMort Bay Consulting\n for reporting this vulnerability.","author":"This document was written by Chad R Dougherty.","public":["http://docs.codehaus.org/display/JETTY/Jetty+Security","http://jira.codehaus.org/browse/JETTY-1004"],"cveids":[""],"certadvisory":"","uscerttechnicalalert":null,"datecreated":"2009-04-29T11:42:35Z","publicdate":"2009-04-29T00:00:00Z","datefirstpublished":"2009-05-01T19:38:40Z","dateupdated":"2009-05-02T01:28:32Z","revision":10,"vrda_d1_directreport":"1","vrda_d1_population":"3","vrda_d1_impact":"2","cam_widelyknown":"1","cam_exploitation":"0","cam_internetinfrastructure":"10","cam_population":"10","cam_impact":"8","cam_easeofexploitation":"20","cam_attackeraccessrequired":"20","cam_scorecurrent":"6.6","cam_scorecurrentwidelyknown":"18","cam_scorecurrentwidelyknownexploited":"30","ipprotocol":"","cvss_accessvector":"--","cvss_accesscomplexity":"--","cvss_authentication":null,"cvss_confidentialityimpact":"--","cvss_integrityimpact":"--","cvss_availabilityimpact":"--","cvss_exploitablity":null,"cvss_remediationlevel":"ND","cvss_reportconfidence":"ND","cvss_collateraldamagepotential":"ND","cvss_targetdistribution":"ND","cvss_securityrequirementscr":"ND","cvss_securityrequirementsir":"ND","cvss_securityrequirementsar":"ND","cvss_basescore":"0","cvss_basevector":"AV:--/AC:--/Au:--/C:--/I:--/A:--","cvss_temporalscore":"0","cvss_environmentalscore":"0","cvss_environmentalvector":"CDP:ND/TD:ND/CR:ND/IR:ND/AR:ND","metric":6.6,"vulnote":null}