starcitizentools/citizen-skin vulnerable to stored, self-XSS in the "real name" field
The advisory, in context
Summary
A user with the editmyprivateinfo right or who can otherwise change their name can XSS themselves by setting their "real name" to an XSS payload.
Details
Here's the offending line: https://github.com/StarCitizenTools/mediawiki-skins-Citizen/blob/d45c3d69f30863f622f16eb40dd41d3ca943454a/includes/Components/CitizenComponentUserInfo.php#L137
This was introduced in 717d16af35b10dab04d434aefddbf991fc8c168c
PoC
- Login
- Go to Special:Preferences
- Set the real name field to a string like
<script>alert("Admin with a propensity for self-XSSes")</script> - Save your settings and use Citizen if it's not being used already
Impact
Any user who can change their name (whether it's through the editmyprivateinfo right or through other means) can add XSS payloads that trigger for themselves only.
Affected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
From 2.6.3 before 2.31.0
Fixed in 2.31.0
59 explicitly affected versions
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.6.3, v2.6.4, v2.6.5, v2.6.6, v2.7.0, v2.7.1, v2.7.10, v2.7.11, 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.8.0, v2.8.1, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.9.0, v2.9.1
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "2.6.3"
},
{
"fixed": "2.31.0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"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.6.3",
"v2.6.4",
"v2.6.5",
"v2.6.6",
"v2.7.0",
"v2.7.1",
"v2.7.10",
"v2.7.11",
"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.8.0",
"v2.8.1",
"v2.8.2",
"v2.8.3",
"v2.8.4",
"v2.8.5",
"v2.9.0",
"v2.9.1"
]
}References
- https://github.com/StarCitizenTools/mediawiki-skins-Citizen/security/advisories/GHSA-62r2-gcxr-426x
- https://nvd.nist.gov/vuln/detail/CVE-2024-47536
- https://github.com/StarCitizenTools/mediawiki-skins-Citizen/commit/717d16af35b10dab04d434aefddbf991fc8c168c
- https://github.com/StarCitizenTools/mediawiki-skins-Citizen/commit/86da3e07718c8d8da6f4310386fef85599606f9b
- https://github.com/StarCitizenTools/mediawiki-skins-Citizen
- https://github.com/StarCitizenTools/mediawiki-skins-Citizen/blob/d45c3d69f30863f622f16eb40dd41d3ca943454a/includes/Components/CitizenComponentUserInfo.php#L137