The massmessage-content-addeditem message is inserted as HTML by the MassMessage extension, allowing for stored XSS to be performed by users with the editinterface permission.
Reproduction steps
- Edit MediaWiki:Massmessage-content-addeditem and change it to <img src=x onerror=alert(1)>
- Go to Special:CreateMassMessageList and create a list
- In the "Add pages" form on the list page, specify any title in the "Title" field
- In the "Site" dropdown, select a wiki that's not the one you're currently using
Cause
https://github.com/wikimedia/mediawiki-extensions-MassMessage/blob/06cced72a4be1bf9eeb9fc412e85de9ee61eef79/modules/ext.MassMessage.content.js#L44-L48
https://github.com/wikimedia/mediawiki-extensions-MassMessage/blob/06cced72a4be1bf9eeb9fc412e85de9ee61eef79/modules/ext.MassMessage.content.js#L67
Additional information
MW: 1.47.0-alpha (c2698c7)
MassMessage: 0.5.0 (06cced7)
Found using semgrep
