Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2025-49576 Overview
CVE-2025-49576 is a stored cross-site scripting (XSS) vulnerability [CWE-79] in the Citizen skin for MediaWiki, maintained by StarCitizenTools. The citizen-search-noresults-title and citizen-search-noresults-desc system messages are inserted into raw HTML without sanitization. Any user with permission to edit MediaWiki system messages can inject arbitrary HTML and JavaScript into the Document Object Model (DOM). The vulnerability is fixed in Citizen version 3.3.1.
Critical Impact
Attackers with message-editing privileges can inject arbitrary HTML or JavaScript that executes in the browsers of all users viewing search result pages, enabling session hijacking and credential theft.
Affected Products
- StarCitizenTools Citizen skin for MediaWiki (versions prior to 3.3.1)
- MediaWiki installations using the Citizen skin with search typeahead enabled
- Wikis exposing MediaWiki: namespace editing to non-administrator roles
Discovery Timeline
- 2025-06-12 - CVE-2025-49576 published to the National Vulnerability Database (NVD)
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-49576
Vulnerability Analysis
The flaw resides in the Citizen skin's search typeahead component. When a search produces no results, the skin renders the citizen-search-noresults-title and citizen-search-noresults-desc system messages directly into raw HTML. Because the message contents are not escaped, any HTML markup contained in those messages is interpreted by the browser rather than displayed as text.
MediaWiki stores interface messages in the MediaWiki: namespace, which is typically editable by administrators or users granted the editinterface right. An attacker holding this permission can modify either message to include a <script> tag or an event handler attribute. The payload then executes in the browser of every visitor whose search query returns no results.
The scope change in the CVSS vector reflects that the injected script runs in the context of the MediaWiki origin, affecting resources beyond the vulnerable component itself. Successful exploitation can lead to session cookie theft, forced actions through CSRF-equivalent requests, defacement, and credential harvesting through fake login prompts.
Root Cause
The skin passed localized message text to a raw HTML sink without routing it through MediaWiki's Html helper or escaping functions. The upstream fix explicitly imports use MediaWiki\Html\Html; in CitizenComponentUserInfo.php and migrates the typeahead rendering to a Mustache template, which escapes variables by default.
Attack Vector
Exploitation requires an authenticated account with permission to edit the MediaWiki: namespace. The attacker edits either MediaWiki:Citizen-search-noresults-title or MediaWiki:Citizen-search-noresults-desc and inserts an HTML payload. User interaction is required: a victim must trigger the typeahead search dropdown and submit a query that returns no results.
The patched i18n file demonstrates the escaping pattern applied to a related message, wrapping literal markup in <nowiki> tags to prevent interpretation:
- "citizen-command-palette-tip-templates": "Type <code>{{</code> to search for templates",
+ "citizen-command-palette-tip-templates": "Type <code><nowiki>{{</nowiki></code> to search for templates",
Source: GitHub Commit 93c36ac
The PHP component was updated to use MediaWiki's Html helper for safe output construction:
namespace MediaWiki\Skins\Citizen\Components;
+use MediaWiki\Html\Html;
use MediaWiki\Language\Language;
use MediaWiki\MediaWikiServices;
use MediaWiki\Title\MalformedTitleException;
Source: GitHub Commit 93c36ac
Detection Methods for CVE-2025-49576
Indicators of Compromise
- Recent revisions to MediaWiki:Citizen-search-noresults-title or MediaWiki:Citizen-search-noresults-desc containing <script>, onerror=, onload=, or javascript: substrings.
- Unexpected outbound requests from client browsers to attacker-controlled domains after search typeahead usage.
- New or elevated accounts recently granted the editinterface user right without a change ticket.
Detection Strategies
- Query the MediaWiki revision and page tables for edits in the MediaWiki: namespace (namespace ID 8) that touch Citizen search message pages.
- Deploy a Content Security Policy (CSP) in report-only mode and alert on script-src violations originating from search result views.
- Review Citizen skin version strings in HTTP responses to identify installations below 3.3.1 across the estate.
Monitoring Recommendations
- Enable MediaWiki AbuseFilter rules that flag edits to MediaWiki:Citizen-search-* pages containing HTML tags or event handler attributes.
- Forward MediaWiki logs and web server access logs to a centralized SIEM for correlation of interface edits with subsequent anomalous client behavior.
- Monitor the user_rights_log for grants of editinterface, interface-admin, or sysop privileges.
How to Mitigate CVE-2025-49576
Immediate Actions Required
- Upgrade the Citizen skin to version 3.3.1 or later immediately.
- Audit all MediaWiki:Citizen-search-noresults-title and MediaWiki:Citizen-search-noresults-desc revisions and revert any entries containing HTML markup.
- Review the list of accounts holding the editinterface right and remove unnecessary grants.
Patch Information
The vulnerability is resolved in Citizen 3.3.1. Fixes are delivered across two commits: commit 93c36ac addresses stored XSS in system messages by routing output through MediaWiki's Html helper, and commit a0296af migrates the typeahead search component to a Mustache template that escapes variables by default. Full details are published in GitHub Security Advisory GHSA-86xf-2mgp-gv3g.
Workarounds
- Restrict the editinterface user right to trusted administrators only, using MediaWiki $wgGroupPermissions configuration.
- Overwrite the vulnerable system messages locally with safe plain-text content until the skin is upgraded.
- Deploy a strict Content Security Policy that disallows inline scripts, reducing the impact of injected payloads.
# LocalSettings.php - restrict interface editing to interface-admin group only
$wgGroupPermissions['sysop']['editinterface'] = false;
$wgGroupPermissions['interface-admin']['editinterface'] = true;
# Enforce a Content Security Policy to block inline script execution
$wgCSPHeader = [
'script-src' => [ "'self'" ],
'default-src' => [ "'self'" ],
];
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

