GHSA-rq6g-6g94-jfr4

Suggest an improvement
Source
https://github.com/advisories/GHSA-rq6g-6g94-jfr4
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/07/GHSA-rq6g-6g94-jfr4/GHSA-rq6g-6g94-jfr4.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-rq6g-6g94-jfr4
Aliases
  • CVE-2025-53368
Published
2025-07-03T20:29:08Z
Modified
2025-07-03T22:19:04.993813Z
Severity
  • 8.6 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L CVSS Calculator
Summary
starcitizentools/citizen-skin is vulnerable to Stored XSS attack in the legacy search bar through page descriptions
Details

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

  • Enable the TextExtracts extension
  • Add $wgCitizenSearchDescriptionSource = 'textextracts'; to your LocalSettings.php
  • Create a page called CitizenXSSTextExtracts and insert <img src="" onerror="alert('citizen search xss')"> into it
  • Open the search modal and search for CitizenXSSTextExtracts

image

Description2 as the description source

  • Enable the Description2 extension
  • Add $wgEnableMetaDescriptionFunctions = true; to your LocalSettings.php to enable the {{#description2:}} parser function
  • Add $wgCitizenSearchDescriptionSource = 'pagedescription'; to your LocalSettings.php
  • Create a page called CitizenXSSDescription2 and insert {{#description2:<img src="" onerror="alert('citizen search xss 2')">}} into it
  • Open the search modal and search for CitizenXSSDescription2

image

Wikibase as the description source

Note that this method is currently untested due to issues I experienced when setting up Wikibase.

  • Enable Wikibase client + repo in your wiki
  • Add $wgCitizenSearchDescriptionSource = 'wikidata'; to your LocalSettings.php
  • Have an item with a description like <img src="" onerror="alert('citizen search xss 3')">
  • Open the search modal and search for the page linked to the item

ShortDescription as the description source

  • Enable the ShortDescription extension
  • Add $wgCitizenSearchDescriptionSource = 'wikidata'; to your LocalSettings.php
  • Create a page called CitizenXSSDescription4 and insert {{SHORTDESC:<img src="" onerror="alert('citizen search xss 4')">}} into it
  • Open the search modal and search for CitizenXSSDescription4

Impact

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.

Database specific
{
    "github_reviewed": true,
    "nvd_published_at": "2025-07-03T20:15:23Z",
    "severity": "HIGH",
    "cwe_ids": [
        "CWE-79"
    ],
    "github_reviewed_at": "2025-07-03T20:29:08Z"
}
References

Affected packages

Packagist / starcitizentools/citizen-skin

Package

Name
starcitizentools/citizen-skin
Purl
pkg:composer/starcitizentools/citizen-skin

Affected ranges

Type
ECOSYSTEM
Events
Introduced
1.9.4
Fixed
3.4.0

Affected versions

v1.*

v1.9.4
v1.9.5
v1.10.0
v1.13.0
v1.14.0
v1.14.1
v1.15.0
v1.16.0
v1.16.1
v1.17.0
v1.17.1
v1.17.2
v1.17.3
v1.17.4
v1.17.5
v1.17.6
v1.17.7
v1.17.8
v1.17.9

v2.*

v2.0.0-alpha.0
v2.0.0-alpha.1
v2.0.0-alpha.2
v2.0.0-beta.0
v2.0.0-beta.1
v2.0.0-beta.2
v2.0.0-beta.3
v2.0.0-beta.4
v2.0.0
v2.0.1
v2.1.0
v2.2.0
v2.3.0
v2.3.1
v2.3.2
v2.3.3
v2.3.4
v2.3.5
v2.3.6
v2.4.0
v2.4.1
v2.4.2
v2.4.3
v2.4.4
v2.5.0
v2.5.1
v2.5.2
v2.6.0
v2.6.1
v2.6.2
v2.6.3
v2.6.4
v2.6.5
v2.6.6
v2.7.0
v2.7.1
v2.7.2
v2.7.3
v2.7.4
v2.7.5
v2.7.6
v2.7.7
v2.7.8
v2.7.9
v2.7.10
v2.7.11
v2.8.0
v2.8.1
v2.8.2
v2.8.3
v2.8.4
v2.8.5
v2.9.0
v2.9.1
v2.10.0
v2.10.1
v2.11.0
v2.11.1
v2.12.0
v2.13.0
v2.13.1
v2.13.2
v2.13.3
v2.13.4
v2.13.5
v2.14.0
v2.14.1
v2.15.0
v2.15.1
v2.16.0
v2.16.1
v2.17.0
v2.17.1
v2.17.2
v2.18.0
v2.18.1
v2.19.0
v2.20.0
v2.21.0
v2.22.0
v2.22.1
v2.23.0
v2.24.0
v2.25.0
v2.26.0
v2.27.0
v2.28.0
v2.29.0
v2.30.0
v2.31.0
v2.32.0
v2.33.0
v2.34.0
v2.35.0
v2.36.0
v2.37.0
v2.38.0
v2.38.1
v2.38.2
v2.38.3
v2.39.0
v2.39.1
v2.39.2
v2.39.3
v2.39.4
v2.40.0
v2.40.1
v2.40.2

v3.*

v3.0.0
v3.1.0
v3.2.0
v3.3.0
v3.3.1
v3.3.2