Skip to content

Stored, self-XSS in the "real name" field

Moderate
alistair3149 published GHSA-62r2-gcxr-426x Sep 28, 2024

Package

Citizen (MediaWiki)

Affected versions

>= 717d16af35b10dab04d434aefddbf991fc8c168c

Patched versions

d4e65977b505bb3915969805cdd5c004325f5e70

Description

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:

<span id="pt-userpage-realname">$realname</span>

This was introduced in 717d16a

PoC

  1. Login
  2. Go to Special:Preferences
  3. Set the real name field to a string like <script>alert("Admin with a propensity for self-XSSes")</script>
  4. 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.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N

CVE ID

CVE-2024-47536

Credits