Summary
The citizen-search-noresults-title
and citizen-search-noresults-desc
system messages are inserted into raw HTML, allowing anybody who can edit those messages to insert arbitrary HTML into the DOM.
Details
The system messages are inserted as raw HTML by the mustache template:
|
{{#title}}<div class="citizen-typeahead-placeholder-title">{{{.}}}</div>{{/title}} |
|
{{#description}}<div class="citizen-typeahead-placeholder-description">{{{.}}}</div>{{/description}} |
PoC
- Edit
citizen-search-noresults-title
and citizen-search-noresults-desc
to <img src="" onerror="alert('citizen-search-noresults-title')">
and <img src="" onerror="alert('citizen-search-noresults-desc')">
(script tags don't work here due to the way the HTML is inserted)
- Open the search bar and search for a page that doesn't exist to get the "no results" messages to show up


Impact
This impacts wikis where a group has the editinterface
but not the editsitejs
user right.
Summary
The
citizen-search-noresults-title
andcitizen-search-noresults-desc
system messages are inserted into raw HTML, allowing anybody who can edit those messages to insert arbitrary HTML into the DOM.Details
The system messages are inserted as raw HTML by the mustache template:
mediawiki-skins-Citizen/resources/skins.citizen.search/templates/TypeaheadPlaceholder.mustache
Lines 8 to 9 in 407052e
PoC
citizen-search-noresults-title
andcitizen-search-noresults-desc
to<img src="" onerror="alert('citizen-search-noresults-title')">
and<img src="" onerror="alert('citizen-search-noresults-desc')">
(script tags don't work here due to the way the HTML is inserted)Impact
This impacts wikis where a group has the
editinterface
but not theeditsitejs
user right.