The vulnerability (CVE-2025-49578 / GHSA-2v3v-3whp-953h) is a stored Cross-Site Scripting (XSS) issue in the starcitizentools/citizen-skin MediaWiki skin. The root cause is the improper handling of user-editable localization messages, specifically date-related messages returned by Language::userDate (a MediaWiki core function). These messages, such as month names, could be manipulated by users with editinterface permissions to include arbitrary HTML and JavaScript.
The primary vulnerable function identified is MediaWiki\Skins\Citizen\Components\CitizenComponentUserInfo::getUserRegistration in includes/Components/CitizenComponentUserInfo.php. This function directly embedded the potentially unescaped output of $this->lang->userDate() into an HTML string using sprintf. An attacker could craft a malicious date message (e.g., a month name containing a script tag) which would then be rendered in the user's browser when their registration date was displayed, leading to XSS. The fix in commit 93c36ac778397e0e7c46cf7adb1e5d848265f1bd addresses this by using Html::element to ensure the date string is properly escaped.
Additionally, the same commit patched another potential XSS vector in the JavaScript function addDefaultPortlet located in resources/skins.citizen.preferences/addPortlet.polyfill.js. This function was changed from using element.innerHTML to element.textContent for assigning content, which is a standard mitigation technique against XSS when the content source might be untrusted or could contain HTML metacharacters.
Other changes in the fix commit, such as modifying Mustache templates (e.g., {{{.}}} to {{.}}) and Vue components (.plain() to .parse()), also contribute to mitigating XSS by ensuring proper escaping and parsing of messages in different contexts within the skin.