CVE-2025-49575:
Citizen skin vulnerable to stored XSS through multiple system messages
6.5
Basic Information
Technical Details
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
starcitizentools/citizen-skin | composer | >= 2.4.2, < 3.3.1 | 3.3.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability (GHSA-4c2h-67qq-vm87 / CVE-2025-49575) encompasses multiple stored Cross-Site Scripting (XSS) flaws within the StarCitizenTools/mediawiki-skins-Citizen skin. The fundamental cause across these issues is the improper handling and sanitization of data, particularly system messages or other content that can be influenced by users with editinterface
permissions, before it is rendered as HTML in the user's browser.
The primary vulnerability, as highlighted in the advisory, resides in the CommandPaletteFooter.vue
component. System messages intended as tips were fetched using mw.message(...).plain()
. This method does not escape HTML entities within the message content. Subsequently, these potentially unsafe messages were rendered into the DOM using Vue's v-html
directive, which explicitly allows raw HTML rendering, thereby creating an XSS vector.
The security patch (commit 93c36ac778397e0e7c46cf7adb1e5d848265f1bd) addressed this specific issue by changing .plain()
to .parse()
, which is designed to handle wikitext and produce safe HTML output suitable for rendering.
Beyond this main issue, the same commit also rectified several other XSS vulnerabilities:
- In
includes/Components/CitizenComponentUserInfo.php
, thegetUserRegistration
method was modified to useHtml::element
for constructing HTML instead ofsprintf
with potentially unescaped date strings. - In
resources/skins.citizen.preferences/addPortlet.polyfill.js
, an assignment toinnerHTML
was replaced with an assignment totextContent
to prevent potential HTML injection through portlet labels. - In Mustache templates (
templates/Menu.mustache
andresources/skins.citizen.search/templates/TypeaheadPlaceholder.mustache
), triple-stashes ({{{.}}}
), which render unescaped HTML, were replaced with double-stashes ({{.}}
) to ensure data is properly escaped before rendering.
These fixes collectively mitigate the risk of attackers injecting malicious scripts by controlling the content of various system messages or other data points within the wiki interface.
Vulnerable functions
CommandPaletteFooter.setup
resources/skins.citizen.commandPalette/components/CommandPaletteFooter.vue
MediaWiki\Skins\Citizen\Components\CitizenComponentUserInfo::getUserRegistration
includes/Components/CitizenComponentUserInfo.php
addDefaultPortlet
resources/skins.citizen.preferences/addPortlet.polyfill.js
Mustache template rendering for Menu.mustache
templates/Menu.mustache
Mustache template rendering for TypeaheadPlaceholder.mustache
resources/skins.citizen.search/templates/TypeaheadPlaceholder.mustache