• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 2.6.1
    • 2.5.7
    • None
    • Solaris 10, JDK 1.5.0_12, SunOne WebServer 6.1 SP8

      A Cross sites scripting vulnerability exists in macro used to render the 'printable' link.

      Here is an exploit for the vulnerability that works

      https://servername/wiki/display/a/2007/09/%22%3E%3Cscript%3Ealert('Watchfire%20XSS%20Test%20Successful')%3C/script%3E

      Bug was found using APPScan.

        1. appscan.wiki.doc
          361 kB
        2. printable-icon-xss.patch
          1 kB
        3. wiki.appscan.doc
          118 kB

            [CONFSERVER-9456] XSS Bug in printable link display

            Matt Ryall added a comment -

            Fix is verified on our internal SSL server (extranet).

            I've attached a patch for this issue. It will also be fixed in Confluence 2.6.1, which is due to be released in approximately two weeks.

            This patch is based off the source, so you'll need to use patch's -p option to remove the leading paths down to just template/includes/macros.vm.

            Matt Ryall added a comment - Fix is verified on our internal SSL server (extranet). I've attached a patch for this issue. It will also be fixed in Confluence 2.6.1, which is due to be released in approximately two weeks. This patch is based off the source, so you'll need to use patch's -p option to remove the leading paths down to just template/includes/macros.vm .

            Wyatt,

            At first I could not reproduce this issue on 2.5, 2.6 or our 2.7 development branch. I took a look at our templates and could see that the URL's were not properly escaped. So I was at a loss to explain what was happening.

            I eventually managed to reproduce this issue against an internal server of ours which was using a HTTPS reverse proxy. It's possible the issue was affected by the HTTPS reverse proxy configuration (which is why I could not reproduce on the HTTP servers).

            I have patched the templates to escape the URL which should address this particular situation. I will close this issue after I've seen it working via HTTPS.

            Cheers
            Matt

            m@ (Inactive) added a comment - Wyatt, At first I could not reproduce this issue on 2.5, 2.6 or our 2.7 development branch. I took a look at our templates and could see that the URL's were not properly escaped. So I was at a loss to explain what was happening. I eventually managed to reproduce this issue against an internal server of ours which was using a HTTPS reverse proxy. It's possible the issue was affected by the HTTPS reverse proxy configuration (which is why I could not reproduce on the HTTP servers). I have patched the templates to escape the URL which should address this particular situation. I will close this issue after I've seen it working via HTTPS. Cheers Matt

            Setting fix-for.

            This is in the printable-view icon on the 404 page, which uses the path of the request URL without correctly escaping it.

            Matt Ryall added a comment - Setting fix-for. This is in the printable-view icon on the 404 page, which uses the path of the request URL without correctly escaping it.

            Thanks for your feedback, we will look into this as soon as possible

            Cheers, Per

            Per Fragemann [Atlassian] added a comment - Thanks for your feedback, we will look into this as soon as possible Cheers, Per

              mjensen m@ (Inactive)
              a06b3b24deee Wyatt Crossin
              Affected customers:
              0 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 2h
                  2h
                  Remaining:
                  Remaining Estimate - 2h
                  2h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified