Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
1.0
Description
Steps to reproduce:
- Log in as a user without programming or script right.
- Open the URL <xwiki-host>/xwiki/bin/edit/<document>/?content=%7B%7Bgroovy%7D%7Dprintln%28%22Hello+from+Groovy%21%22%29%7B%7B%2Fgroovy%7D%7D&xpage=view, where <xwiki-host> is the URL of your XWiki installation and <document> is the path to a document whose content author has programming right (or script right) and on which the current user has edit right.
Expected result:
An error is displayed as the current user doesn't have programming right.
Actual result:
The text "Hello from Groovy!" is displayed in the page content, showing that the Groovy macro has been executed.
The reason for this is that the edit action sets the content without modifying the content author.
Note that this attack even works for a user without edit right if the user account has been created by an admin with programming right (this requires passing the parameter sheet= to disable the default display sheet).
Attachments
Issue Links
- is related to
-
XWIKI-20331 RCE payloads stored in comments and profile are executed when admin user edits them.
- Closed
- relates to
-
XWIKI-20386 CSRF privilege escalation/RCE via the edit action
- Closed