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

Privilege escalation from edit to script right through Live Data editing

    XMLWordPrintable

Details

    • Integration
    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce:

      1. Log in as a user without script right
      2. Edit any page you can edit and add the following Live Data:
        {{liveData properties="doc.location,levels" source="liveTable" sourceParameters="className=XWiki.XWikiRights"/}}

        and a Velocity macro like

        {{velocity}}Hello from Velocity!{{/velocity}}
      3. Make sure your user is advanced
      4. Edit the rights of the page by clicking on "Access Rights" in the edit menu
      5. Grant edit right to your user
      6. View the page
      7. In the Live Data, you should see the current page. Click on the edit icon that appears when hovering the "edit" entry in the "Levels" column.
      8. Select "script" and click outside to trigger saving.
      9. Reload the page

      Expected result:

      The script macro still displays an error and the level is still "edit".

      Actual result:

      The level is "script" and the script macro is executed.

      This demonstrates a privilege escalation from edit to script right. This works for any right that can be assigned on the page level.

      Attachments

        Issue Links

          Activity

            People

              MichaelHamann Michael Hamann
              MichaelHamann Michael Hamann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: