Multiple Vulnerabilities in Sun-One Application Server ------------------------------------------------------- [Release Date]: May 27, 2003 [System Affected] * Sun-ONE Application Server 7.0 for Windows 2000/XP [Description] During a brief audit of a SunONE Application Server installation on Windows 2000, SPI Labs discovered a number of vulnerabilities. Each of the vulnerabilities is described in detail below. The complete advisory is also available from our website at: http://www.spidynamics.com/sunone_alert.html. Issue 1: JSP source code disclosure Severity: High ------------------------------------- It is possible to view the source code of JSP applications by changing the case of the file extension in the HTTP request. The vulnerability is due to Unix code being ported to the Microsoft Windows platform where the filesystem is case insensitive. When a request is received, the server performs a case sensitive check to determine if the request ends in ".jsp". If it does, the JSP engine will process it. Otherwise, it will see if it can retrieve the requested resource from the filesystem. On Unix operating systems, this will fail because of "file.jsp" cannot be opened by asking for "file.JSP" However, on Windows the file will be returned because the filesystem is case insensitive. Below is an example of a normal request/response, followed by the same request/response with the case change applied. The headers and response data have been trimmed for clarity. [Original request] GET /hello.jsp HTTP/1.0 [Original response] HTTP/1.1 200 OK Server: Sun-ONE-Application-Server/7.0 (more headers)
Exception
javax.servlet.ServletException: Invalid JSP file at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:471) at _jasper._jsp._source_jsp._jspService(_source_jsp.java:88) Issue 4: Incorrect local file permissions and plaintext passwords Severity: Medium ------------------------------------- When installing SunONE on Windows 2000 the default installation directory is C:\sun. Any file or directory created in this directory will be world-readable. The "statefile" located at C:\sun\appserver7\statefile contains a plaintext username and password to the administrative server. . Remediation ------------------------------------- Sun Microsystems was contacted on the 18th of March 2003 and again on numerous occasions without results. We hope that by publishing this information, the vendor will correct these problems. Unfortunately, there is no remediation procedure for the first, second or third issues. For the last issue, "Incorrect local file permissions and plaintext passwords" we recommend that the permissions of the statefile be changed so that only the administrator can access it. [Contact Information] Contact Information spilabs@spidynamics.com SPI Dynamics, Inc. 115 Perimeter Center Place N.E. suite 270 Atlanta, GA. 30346 Toll-Free Phone: (866) 774-2700 SPI Dynamics was founded in 2000 by a team of accomplished Web security specialists; SPI Dynamics is the leader in Web application security technology. With such signature products as WebInspect, SPI Dynamics is dedicated to protecting companies' most valuable assets. SPI Dynamics has created a new breed of Internet security products for the Web application, the most vulnerable yet least secure component of online business infrastructure. Copyright (c) 2003 SPI Dynamics, Inc. All rights reserved worldwide.