Adding special characters to the HTTP request causes exposure of JSP source code files

Source: Internet
Author: User

Involved procedures:
ServletExec

Description:
Adding special characters to the HTTP request causes exposure of JSP source code files

Details:
Unify eWave ServletExec is a Java/Java Servlet Engine plug-in for WEB servers, such as Microsoft IIS, Apache, and Netscape Enterprise Servers.

When one of the following characters is added to an HTTP request, ServletExec returns the JSP source code file.
.
% 2E
+
% 2B

% 5C
% 20
% 00

The vulnerability can cause leakage of the source code of the specified JSP file.

For example:
Use any of the following URL requests to output the source code of the specified JSP file:
Http: // target/directory/jsp/file. jsp.
Http: // target/directory/jsp/file. jsp % 2E
Http: // target/directory/jsp/file. jsp +
Http: // target/directory/jsp/file. jsp % 2B
Http: // target/directory/jsp/file. jsp
Http: // target/directory/jsp/file. jsp % 5C
Http: // target/directory/jsp/file. jsp % 20
Http: // target/directory/jsp/file. jsp % 00

Affected Systems:
Unify eWave ServletExec 3.0c
-Sun Solaris 8.0
-Microsoft Windows 98
-Microsoft Windows NT 4.0
-Microsoft Windows NT 2000
-Linux kernel 2.3.x
-Ibm aix 4.3.2
-HP HP-UX 11.4
Unify eWave ServletExec 3.0
-Sun Solaris 8.0
-Microsoft Windows 98
-Microsoft Windows NT 4.0
-Microsoft Windows NT 2000
-Linux kernel 2.3.x
-Ibm aix 4.3.2
-HP HP-UX 11.4

Solution:
Temporary solution:
If no static page or image is used, you can configure a default servlet and map "/" to this default servlet. In this way, when a URL not mapped to a servlet is received, the default servlet will be called. In this case, the default servlet can only return "files not found ". If a static page or image is used, you can still configure it like this, but you need to have this default servlet process requests for valid static pages and images.

Another possibility is to map *. jsp +, *. jsp. And *. jsp to a servlet, And the servlet only returns "file not found ". For situations such as *. jsp % 00 and *. jsp % 20, the ing should be input without encoding. For example, for *. jsp % 20 ing, enter "*. jsp ". Note that % 20 is converted into a space character.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.