starcitizentools/citizen-skin
Affected
- introduced
1.9.4, fixed3.4.0(ecosystem)
Fixed versions
3.4.0
Fix
The export has no generic command for this ecosystem.
Advisory
Also known as: CVE-2025-53368
starcitizentools/citizen-skin is vulnerable to Stored XSS attack in the legacy search bar through page descriptions
Summary
Page descriptions are inserted into raw HTML without proper sanitization by the Citizen skin when using the old search bar.
Details
The descriptions, which are unsanitized, are inserted as raw HTML:
https://github.com/StarCitizenTools/mediawiki-skins-Citizen/blob/d4dfc3697a82948b3b9c4d44e9a273c79bc86b87/resources/skins.citizen.search/templates/TypeaheadListItem.mustache#L18
PoC
All of the reproduction methods require the command palette to be disabled via $wgCitizenEnableCommandPalette = false;.
Additionally, the action API must be used as the Search Gateway via $wgCitizenSearchGateway = 'mwActionApi';.
TextExtracts as the description source
$wgCitizenSearchDescriptionSource = 'textextracts'; to your LocalSettings.phpCitizenXSSTextExtracts and insert <img src="" onerror="alert('citizen search xss')"> into itCitizenXSSTextExtractsDescription2 as the description source
$wgEnableMetaDescriptionFunctions = true; to your LocalSettings.php to enable the {{#description2:}} parser function$wgCitizenSearchDescriptionSource = 'pagedescription'; to your LocalSettings.phpCitizenXSSDescription2 and insert {{#description2:<img src="" onerror="alert('citizen search xss 2')">}} into itCitizenXSSDescription2Wikibase as the description source
Note that this method is currently untested due to issues I experienced when setting up Wikibase.
$wgCitizenSearchDescriptionSource = 'wikidata'; to your LocalSettings.php<img src="" onerror="alert('citizen search xss 3')">ShortDescription as the description source
$wgCitizenSearchDescriptionSource = 'wikidata'; to your LocalSettings.phpCitizenXSSDescription4 and insert {{SHORTDESC:<img src="" onerror="alert('citizen search xss 4')">}} into itCitizenXSSDescription4Impact
On all wikis that use the aforementioned settings (command palette disabled or using an old release where the old search bar is still used; using the action API as the search gateway), anybody who can edit pages is able to insert XSS payloads into the DOM for other users who are searching for specific pages.
High Basis: The source's own band: HIGH
1.9.4, fixed 3.4.0 (ecosystem)3.4.0
The export has no generic command for this ecosystem.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0