Uploaded image for project: 'JSPWiki'
  1. JSPWiki
  2. JSPWIKI-315

Attachment upload allows .jsp files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7.x
    • 2.6.4, 2.8
    • Core & storage
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ajaquith Andrew R. Jaquith
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: