Multiple system messages are inserted as raw HTML by the CheckUser extension, allowing for stored XSS.
checkuser-tempaccount-specialblock-ips
Reproduction steps
- Make sure $wgUseXssLanguage is set to true
- Make sure a temporary account exists in the wiki
- Make sure you have the relevant permissions to view the IPs of temporary accounts
- Go to /wiki/Special:Block?uselang=x-xss
- Enter the username of a temporary account into the "Target" field
- Click the "Show IP" link below the field
Cause
The system message is retrieved unescaped using mw.msg and inserted as HTML via a HtmlSnippet:
https://gerrit.wikimedia.org/g/mediawiki/extensions/CheckUser/+/e561217388ea1fc581fb573631318c41044517e8/modules/ext.checkUser.tempAccounts/SpecialBlock.js#98
checkuser-tempaccount-specialblock-ips
Reproduction steps
- Edit MediaWiki:checkuser-tempaccount-specialblock-ips to <img src="" onerror="alert(1)">
- Add the following to your LocalSettings.php:
$wgUseCodexSpecialBlock = true; $wgEnableMultiBlocks = true;
- Go to /wiki/Special:Block/~2025-1 (make sure a temp account is selected a s the target)
- Click "Show IP"
Cause
https://gerrit.wikimedia.org/g/mediawiki/extensions/CheckUser/+/e561217388ea1fc581fb573631318c41044517e8/modules/ext.checkUser.tempAccounts/ShowIPButton.vue#121
https://gerrit.wikimedia.org/g/mediawiki/extensions/CheckUser/+/e561217388ea1fc581fb573631318c41044517e8/modules/ext.checkUser.tempAccounts/ShowIPButton.vue#8
checkuser-tempaccount-no-ip-results
Cause
https://gerrit.wikimedia.org/g/mediawiki/extensions/CheckUser/+/e561217388ea1fc581fb573631318c41044517e8/modules/ext.checkUser.tempAccounts/ShowIPButton.vue#127
https://gerrit.wikimedia.org/g/mediawiki/extensions/CheckUser/+/e561217388ea1fc581fb573631318c41044517e8/modules/ext.checkUser.tempAccounts/ShowIPButton.vue#8
checkuser-tempaccount-reveal-ip-error
Cause
https://gerrit.wikimedia.org/g/mediawiki/extensions/CheckUser/+/e561217388ea1fc581fb573631318c41044517e8/modules/ext.checkUser.tempAccounts/ShowIPButton.vue#134
https://gerrit.wikimedia.org/g/mediawiki/extensions/CheckUser/+/e561217388ea1fc581fb573631318c41044517e8/modules/ext.checkUser.tempAccounts/ShowIPButton.vue#8


