The imagerating-category system message is inserted as HTML by the ImageRating extension, allowing for stored XSS.
Reproduction
- Enable VoteNY and ImageRating
- Upload a file
- Add <vote type=1 /> to the file page
- Vote for the file
- Make sure $wgUseXssLanguage is set to true
- Go to /wiki/Special:ImageRating?uselang=x-xss
- Enter any valid category name (doesn't have to exist) into the textbox next to the image you just rated and click the button under the text box
Cause
The result of mw.msg(), which returns system messages unescaped, is passed to the .html() function of jQuery, causing the message contents to be inserted as raw HTML.
