The cite-ve-dialog-subreference-help-dialog-content message is inserted as raw HTML by the Cite extension, allowing for stored XSS.
Reproduction steps
- Install Cite and VisualEditor and make sure $wgUseXssLanguage is set to true
- Create a page called "CiteVETest" with the following contents using source editor: <ref name=":0">Test</ref><ref name=":0" /> (the vulnerability is also reproducible just by using VE, but this is easier)
- Go to /wiki/CiteVETest?veaction=edit&uselang=x-xss
- Wait for VE to load and left click on the second [1]
- Click the button at the bottom of the modal (called "Add details" normally)
Cause
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Cite/+/1182871 (merged last week)
There even is a FIXME comment regarding the issue (but apparently the author wasn't aware that this is a vulnerability):
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/Cite/+blame/314bd0681799af1b40eeea096d76b7f5365846ef/modules/ve-cite/ve.ui.MWSubReferenceHelpDialog.js#58
