Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
1.1.2, 1.2 M2
-
Unit
-
Unknown
-
N/A
-
N/A
-
Awaiting Committer feedback
-
Description
Steps to reproduce:
- As a user without script or programming right, create a (non-terminal) document named " + alert(1) + " (the quotes need to be part of the name).
- Edit the class.
- Add a string property name "test".
- Edit using the object editor and add an object of the created class
- Get an admin to open <xwiki-server>/xwiki/bin/view/%22%20%2B%20alert(1)%20%2B%20%22/?viewer=display&type=object&property=%22%20%2B%20alert(1)%20%2B%20%22.WebHome.test&mode=edit where <xwiki-server> is the URL of your XWiki installation.
Expected result:
No alert is displayed.
Actual result:
An alert with content "1" is displayed.
This demonstrates an XSS vulnerability as the class name is inserted into the "onfocus" attribute without escaping. The relevant code is in https://github.com/xwiki/xwiki-platform/blob/82c31ea56be4ac756140f082d216268e1dca6ac8/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/StringClass.java#L118
Attachments
Issue Links
- is caused by
-
XWIKI-1780 Improve rights management
- Closed
- links to