Summary
Various preferences messages are inserted into raw HTML, allowing anybody who can edit those messages to insert arbitrary HTML into the DOM.
Details
The innerHtml
of the label div is set to the textContent
of the label, essentially unsanitizing the system messages:
|
labelDiv.innerHTML = label.textContent || ''; |
PoC
- Edit
citizen-feature-custom-font-size-name
(or any other message displayed in a heading in the preferences menu) to <img src="" onerror="alert('citizen-feature-custom-font-size-name')">
(script tags don't work here due to the way the HTML is inserted)
- Open the preferences menu

Summary
Various preferences messages are inserted into raw HTML, allowing anybody who can edit those messages to insert arbitrary HTML into the DOM.
Details
The
innerHtml
of the label div is set to thetextContent
of the label, essentially unsanitizing the system messages:mediawiki-skins-Citizen/resources/skins.citizen.preferences/addPortlet.polyfill.js
Line 18 in 407052e
PoC
citizen-feature-custom-font-size-name
(or any other message displayed in a heading in the preferences menu) to<img src="" onerror="alert('citizen-feature-custom-font-size-name')">
(script tags don't work here due to the way the HTML is inserted)