Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
8.3-rc-1
Description
Steps to reproduce:
- As a user without script right, create a document, e.g., named Nasty Title
- Set the document's title to $request.requestURI
- Click "Save & View"
- Reload the page in the browser
Expected result:
A document named $request.requestURI is displayed in the navigation panel.
Actual result:
A document /xwiki/bin/get/Nasty%20Title/WebHome is displayed, showing that the Velocity code has been executed even though the user doesn't have script right.
This is because the document tree macro sets the title which changes the document's author to the author of XWiki.DocumentTreeMacros and thus the title is executed. It's only because of XWIKI-20624 that the context document and author is unchanged during the actual execution of the title, once XWIKI-20624 has been fixed this is an escalation to programming rights.
As long as XWIKI-20624 hasn't been fixed, the context author is still the current user so any APIs that check author rights are safe. However, we have several privilege escalation vulnerabilities from script right and I can confirm that at least some of them can be exploited from this like XWIKI-19790 (requires admin interaction) or XWIKI-19858 (no interaction required), both allow gaining programming rights. I'm therefore still marking this as escalation attack as we can use features only available with script right.
Attachments
Issue Links
- depends on
-
XWIKI-20716 The URL sheet is applied to a document gathered from the store
- Closed
- is caused by
-
XWIKI-13710 The title displayed for the current document in the navigation panel is "Document Tree"
- Closed
- is related to
-
XWIKI-20624 Privilege escalation from script right to programming right through title displayer
- Closed