Page MenuHomePhabricator

CVE-2025-62663: Stored XSS through a system message in UploadWizard
Closed, ResolvedPublicSecurity

Description

The mwe-upwiz-source-ownwork-origin-option-ai-description system message is inserted as raw HTML by the UploadWizard extension, allowing for stored XSS.

Reproduction steps

  1. Make sure $wgUseXssLanguage is set to true
  2. Make sure uploads are enabled and you're logged in
  3. Go to /wiki/Special:UploadWizard?uselang=x-xss
  4. Click the blue button
  5. Click the blue upload button and select any file
  6. Click the blue "Next" button in the bottom right

image.png (227×812 px, 34 KB)

Cause

The result of mw.msg, which returns the unescaped contents of the message, is wrapped in an HtmlSnippet.
https://gerrit.wikimedia.org/g/mediawiki/extensions/UploadWizard/+/f86dd16bcb67ece9d838d4b5fffbb41a91ab069f/resources/deed/uw.deed.OwnWork.js#147

Additional information

Event Timeline

Patch:


The message only contains <b> tags (at least in the default translation), so parsing it should be fine

sbassett changed the task status from Open to In Progress.Aug 18 2025, 4:36 PM
sbassett reassigned this task from SomeRandomDeveloper to mmartorana.
sbassett triaged this task as Low priority.
sbassett moved this task from Incoming to In Progress on the Security-Team board.
sbassett added a project: SecTeam-Processed.

From a security perspective, this is safe to deploy.

sbassett subscribed.

The above patch was deployed during today's (2025-08-25) security window.

Reedy added a subscriber: gerritbot.

Change #1189182 had a related patch set uploaded (by Reedy; author: nousername):

[mediawiki/extensions/UploadWizard@master] SECURITY: Parse system message instead of inserting it as HTML

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

Change #1189182 merged by jenkins-bot:

[mediawiki/extensions/UploadWizard@master] SECURITY: Parse system message instead of inserting it as HTML

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

Change #1189211 had a related patch set uploaded (by Reedy; author: nousername):

[mediawiki/extensions/UploadWizard@REL1_44] SECURITY: Parse system message instead of inserting it as HTML

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

Change #1189215 had a related patch set uploaded (by SomeRandomDeveloper; author: SomeRandomDeveloper):

[mediawiki/extensions/UploadWizard@REL1_43] SECURITY: Parse system message instead of inserting it as HTML

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

Change #1189216 had a related patch set uploaded (by SomeRandomDeveloper; author: SomeRandomDeveloper):

[mediawiki/extensions/UploadWizard@REL1_39] SECURITY: Parse system message instead of inserting it as HTML

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

Change #1189216 abandoned by SomeRandomDeveloper:

[mediawiki/extensions/UploadWizard@REL1_39] SECURITY: Parse system message instead of inserting it as HTML

Reason:

The affected code and the system message don't exist in 1.39

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

Change #1189211 merged by jenkins-bot:

[mediawiki/extensions/UploadWizard@REL1_44] SECURITY: Parse system message instead of inserting it as HTML

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

Change #1189215 merged by jenkins-bot:

[mediawiki/extensions/UploadWizard@REL1_43] SECURITY: Parse system message instead of inserting it as HTML

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

Mstyles renamed this task from Stored XSS through a system message in UploadWizard to CVE-2025-62663: Stored XSS through a system message in UploadWizard.Oct 18 2025, 5:00 AM
Mstyles changed the visibility from "Custom Policy" to "Public (No Login Required)".
Mstyles changed the edit policy from "Custom Policy" to "All Users".
A_smart_kitten removed a project: Patch-For-Review.

(reassigning to patch author for posterity)