CVE-2025-53368: starcitizentools/citizen-skin is vulnerable to Stored XSS attack in the legacy search bar through page descriptions
8.6
Basic Information
Technical Details
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| starcitizentools/citizen-skin | composer | >= 1.9.4, < 3.4.0 | 3.4.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The security vulnerability is a stored Cross-Site Scripting (XSS) attack in the legacy search functionality of the starcitizentools/citizen-skin MediaWiki skin. The core of the issue lies in the fact that page descriptions, which can be created or edited by users, were being rendered directly into the search results without any sanitization.
The provided patch, commit aedbceb3380bb48db6b59e272fc187529c71c8ca, clearly illustrates the vulnerability. The change is in the resources/skins.citizen.search/templates/TypeaheadListItem.mustache file, which is a Mustache template for displaying search result items. The patch replaces {{{.}}} with {{.}} for the description field.
In Mustache templating, the triple curly braces {{{.}}} are used to output a variable without any HTML escaping, meaning any HTML or script tags within the variable's content will be rendered as-is by the browser. This is the direct cause of the XSS vulnerability. The fix, using double curly braces {{.}}, ensures that the content of the description variable is HTML-escaped, converting characters like < and > into their respective HTML entities (< and >), thus preventing the browser from interpreting them as code.
While a runtime profiler would show a generic Mustache rendering function executing, the vulnerability itself is defined by the logic within the TypeaheadListItem.mustache template. Therefore, this template is identified as the key vulnerable component.