Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-20352

RXSS via xredirect parameter in restore template

Details

    • Unknown
    • N/A

    Description

      SUBMISSION REFERENCES

      RESEARCHER INFORMATION

      • Submitter: renniepak

      SUBMISSION INFORMATION

      • Created at: Wed, 09 Nov 2022 14:28:57 GMT
      • Submission status: Archived

      REPORT CONTENT

      I found a Reflected Cross-Site Scripting vulnerability in the restore.vm template.

        1. Reproduction

      1. Navigate to: https://intigriti.xwiki.com/xwiki/bin/view/XWiki/Main?xpage=restore&showBatch=true&xredirect=javascript:alert(document.domain)
      2. Click the cancel button.

        1. Result

      As soon as the cancel button is clicked our XSS payload triggers:

      {709359}

      Vulnerable code snippet:

      https://github.com/xwiki/xwiki-platform/blob/244dbbaa0738a0c40b19929c0369c8b62ae5236e/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/restore.vm#L176

      • Impact: If an attacker can control a script that is executed in the victim's browser, then they can typically fully compromise that user. Amongst other things, the attacker can:
      • Perform any action within the application that the user can perform.
      • View any information that the user is able to view.
      • Modify any information that the user is able to modify.
      • Personal data involved: No
      • Recommended solution: In general, effectively preventing XSS vulnerabilities is likely to involve a combination of the following measures:
      • *Filter input on arrival.* At the point where user input is received, filter as strictly as possible based on what is expected or valid input.
      • *Encode data on output.* At the point where user-controllable data is output in HTTP responses, encode the output to prevent it from being interpreted as active content. Depending on the output context, this might require applying combinations of HTML, URL, JavaScript, and CSS encoding.
      • *Use appropriate response headers.* To prevent XSS in HTTP responses that aren't intended to contain any HTML or JavaScript, you can use the Content-Type and X-Content-Type-Options headers to ensure that browsers interpret the responses in the way you intend.
      • *Content Security Policy.* As a last line of defense, you can use Content Security Policy (CSP) to reduce the severity of any XSS vulnerabilities that still occur.
      • Endpoint: https://intigriti.xwiki.com/xwiki/bin/view/XWiki/Main?xpage=restore&showBatch=true&xredirect=javascript:alert(document.domain)
      • Type: Reflected Cross-Site Scripting
      • Attachments: Screenshot 2022-11-09 152607.png

      Attachments

        Issue Links

          Activity

            [XWIKI-20352] RXSS via xredirect parameter in restore template

            Message posted by azerty [ triage ] on 11/10/2022 09:28:13 +00:00:

            Hi there renniepak!
            
            Thanks for the report!
            
            We have verified your submission and will forward it to XWiki. They will review your report and come back to you soon.
            
            Enjoy your weekend!
            
            Kind regards
            
            azerty
            intigriti Intigriti Integration added a comment - Message posted by azerty [ triage ] on 11/10/2022 09:28:13 +00:00: Hi there renniepak! Thanks for the report! We have verified your submission and will forward it to XWiki. They will review your report and come back to you soon. Enjoy your weekend! Kind regards azerty

            People

              surli Simon Urli
              intigriti Intigriti Integration
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: