Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.7.x
-
None
-
All
Description
http://marc.info/?l=bugtraq&m=120300554011544&w=2
As described in the vulnerability disclosure. An uploaded file attachment, if a JSP, will execute when viewed. Steps to reproduce:
1. Create a JSP called Foo.jsp with these contents: URI: <%=request.getRequestURI()%>
2. Navigate to page Main and upload this attachment/
3. Supplying the URL http://localhost:8080/JSPWiki/Foo.jsp will execute the JSP and display the URI.
However, uploading a file that contains JSP content, but does NOT have the .jsp suffix seems fine. E.g., http://localhost:8080/JSPWiki/Bar (no extension) does cause the contents of Bar to be compiled and executed.
Recommendation: any files with .jsp extension should be forcibly stripped out from the file, or else simply rejected.