Page MenuHomePhabricator

CVE-2025-53488: Stored XSS through system messages in WikiHiero
Closed, ResolvedPublicSecurity

Description

The wikihiero-input and wikihiero-result system messages are concatenated with raw HTML in the WikiHiero extension, allowing arbitrary HTML to be inserted into the DOM by editing these system messages.

Reproduction steps

  1. Go to Special:Hieroglyphs?uselang=x-xss in your wiki
  2. Enter any text into the input and click Submit

image.png (150×416 px, 10 KB)

image.png (197×417 px, 12 KB)

Cause

The system messages are retrieved via mw.msg() and concatenated with raw HTML: https://github.com/wikimedia/mediawiki-extensions-wikihiero/blob/cdbcaea09bdf79c4ce6f6b86a9afd2fe251bb63e/modules/ext.wikihiero.special.js#L29-L32

Additional information

  • MediaWiki 1.45.0-alpha (b6993c3)
  • PHP 8.3.14 (fpm-fcgi)
  • WikiHiero 1.1 (cdbcaea)
  • Firefox 139.0 on Fedora Linux 42

Event Timeline

sbassett added subscribers: Esanders, Umherirrender, sbassett.

Patch:

CR+1. Would be good to get this deployed this week.

sbassett changed the task status from Open to In Progress.Jun 12 2025, 10:02 PM
sbassett moved this task from Security Patch To Deploy to Watching on the Security-Team board.
Jly renamed this task from Stored XSS through system messages in WikiHiero to CVE-2025-53488: Stored XSS through system messages in WikiHiero.Jun 30 2025, 7:21 PM

Change #1166018 had a related patch set uploaded (by Jly; author: Jly):

[mediawiki/extensions/wikihiero@master] SECURITY: Insert system messages using .text() to prevent stored XSS

https://gerrit.wikimedia.org/r/1166018

Change #1166019 had a related patch set uploaded (by Jly; author: Jly):

[mediawiki/extensions/wikihiero@REL1_44] SECURITY: Insert system messages using .text() to prevent stored XSS

https://gerrit.wikimedia.org/r/1166019

Change #1166020 had a related patch set uploaded (by Jly; author: Jly):

[mediawiki/extensions/wikihiero@REL1_43] SECURITY: Insert system messages using .text() to prevent stored XSS

https://gerrit.wikimedia.org/r/1166020

Change #1166021 had a related patch set uploaded (by Jly; author: Jly):

[mediawiki/extensions/wikihiero@REL1_42] SECURITY: Insert system messages using .text() to prevent stored XSS

https://gerrit.wikimedia.org/r/1166021

Change #1166022 had a related patch set uploaded (by Jly; author: Jly):

[mediawiki/extensions/wikihiero@REL1_39] SECURITY: Insert system messages using .text() to prevent stored XSS

https://gerrit.wikimedia.org/r/1166022

@Jly please make sure to set the author field of these and the other security patches that are currently being uploaded to gerrit so the authors are properly credited, thank you.

Change #1166021 abandoned by Jly:

[mediawiki/extensions/wikihiero@REL1_42] SECURITY: Insert system messages using .text() to prevent stored XSS

https://gerrit.wikimedia.org/r/1166021

Change #1166022 abandoned by Jly:

[mediawiki/extensions/wikihiero@REL1_39] SECURITY: Insert system messages using .text() to prevent stored XSS

https://gerrit.wikimedia.org/r/1166022

Change #1166018 merged by Jly:

[mediawiki/extensions/wikihiero@master] SECURITY: Insert system messages using .text() to prevent stored XSS

https://gerrit.wikimedia.org/r/1166018

Change #1166020 merged by Jly:

[mediawiki/extensions/wikihiero@REL1_43] SECURITY: Insert system messages using .text() to prevent stored XSS

https://gerrit.wikimedia.org/r/1166020

Change #1166019 merged by Jly:

[mediawiki/extensions/wikihiero@REL1_44] SECURITY: Insert system messages using .text() to prevent stored XSS

https://gerrit.wikimedia.org/r/1166019

Jly removed a project: Patch-For-Review.
sbassett changed the visibility from "Custom Policy" to "Public (No Login Required)".
sbassett changed the edit policy from "Custom Policy" to "All Users".
sbassett changed Risk Rating from N/A to Low.
sbassett moved this task from Watching to Our Part Is Done on the Security-Team board.

Change #1166022 restored by SBassett:

[mediawiki/extensions/wikihiero@REL1_39] SECURITY: Insert system messages using .text() to prevent stored XSS

https://gerrit.wikimedia.org/r/1166022

Change #1166021 restored by SBassett:

[mediawiki/extensions/wikihiero@REL1_42] SECURITY: Insert system messages using .text() to prevent stored XSS

https://gerrit.wikimedia.org/r/1166021

Change #1166022 merged by jenkins-bot:

[mediawiki/extensions/wikihiero@REL1_39] SECURITY: Insert system messages using .text() to prevent stored XSS

https://gerrit.wikimedia.org/r/1166022

Change #1166021 merged by SBassett:

[mediawiki/extensions/wikihiero@REL1_42] SECURITY: Insert system messages using .text() to prevent stored XSS

https://gerrit.wikimedia.org/r/1166021