The core vulnerability (GHSA-g3cp-pq72-hjpv, CVE-2025-49579) lies in the unescaped rendering of system messages within menu headings generated by the Menu.mustache template. Users with editinterface permissions could modify these system messages (e.g., MediaWiki:Navigation, MediaWiki:Notifications) to include malicious HTML and JavaScript. When the Citizen skin rendered these messages as menu labels using {{{.}}} (or an effectively unescaped {{label}} in earlier versions), the malicious code would execute in the context of other users' browsers, leading to a stored XSS.
The security patch 93c36ac778397e0e7c46cf7adb1e5d848265f1bd addresses this primary issue by changing the template to use {{.}} for labels, ensuring proper HTML escaping.
Furthermore, this commit also fixed several other XSS vulnerabilities throughout the Citizen skin:
- In
CitizenComponentUserInfo::getUserRegistration, by switching from manual HTML construction with sprintf to the safer Html::element for user registration dates.
- In
CommandPaletteFooter.vue, by changing how mw.message outputs are handled (from .plain() to .parse(), implying that the messages might contain intended HTML/wikitext that now gets processed by MediaWiki's safer parser) and by fixing underlying i18n message content.
- In the
addDefaultPortlet JavaScript function, by replacing a risky innerHTML assignment with a safer textContent assignment.
- In the
TypeaheadPlaceholder.mustache template, by ensuring title and description variables are rendered with escaping.
Collectively, these changes indicate a broader pattern of insufficient output escaping for dynamic or user-controllable data in various parts of the skin, which were rectified in the patch.