Page MenuHomePhabricator

CVE-2025-53491: Special:PendingChanges vulnerable to i18n XSS
Closed, ResolvedPublicSecurity

Description

Summary

Special:PendingChanges is vulnerable to i18n XSS (per checking with the x-xss language)

Background

  • The x-xss language allows finding messages which are not properly escaped in MediaWiki interfaces
  • Special:PendingChanges allows users to see pages that have changes pending and was redesigned using Codex a few months back
  • When using the x-xss language on Special:PendingChanges, there is are multiple popups indicating that messages introduce i18n XSS. These include:
    • pendingchanges-diff
    • pendingchanges-table-watching
    • pendingchanges-table-pending-since
    • pendingchanges-table-size
    • pendingchanges-table-review
    • pendingchanges-table-page
    • pendingchanges-table-footer
    • pendingchanges-table-caption

Screenshots

image.png (682×1 px, 145 KB)

Acceptance criteria

  • Special:PendingChanges is not vulnerable to message key XSS

Event Timeline

sbassett changed the task status from Open to In Progress.May 19 2025, 4:37 PM
sbassett changed Author Affiliation from N/A to WMF Technology.
sbassett changed Risk Rating from N/A to Medium.
sbassett moved this task from Incoming to In Progress on the Security-Team board.
sbassett added a project: SecTeam-Processed.

@Dreamy_Jazz are you intending to work on this ticket or should I look for another contributor?

Hi @Mstyles. This isn't in Trust and Safety Product Team team owned code, so I'm not sure I could work on it with my WMF hat on (given the focus on Temporary accounts to get ready for a deployment)

I might have space as a volunteer to work on this, but not for at least a few weeks. So I'd suggest finding someone else if this needs to be fixed sooner for a security release.

@Dreamy_Jazz thank you for reporting this issue. I'll ask around and see if anyone is interested in working on this.

@dmaza @lwatson you recently addressed a codex issue in T394396, do you think you could take a look at this issue?

@dmaza @lwatson you recently addressed a codex issue in T394396, do you think you could take a look at this issue?

Sure, I can take a look sometime this week.

I think this should do it. Unaware of who is the right person to ping to review for review. @Dreamy_Jazz, do you think you or someone from Trust and Safety Product Team can take a look?

Trust and Safety Product Team don't own this extension, but I can take a look.

Oh sorry, my bad. I misread and thought it was owned by tsp.
And thank you for taking a look.

I applied the patch locally and saw that it fixes the XSS but causes some HTML to be displayed as text where it shouldn't be:

image.png (560×978 px, 52 KB)

I think that can be fixed by passing the $chip parameter in as a ::rawParam. That shouldn't cause XSS because the HTML in $chip has already escaped the formatted count.

Woops. Not sure how I missed that. Thank you.

It seems that the plural syntax is currently broken on that message so that's a different issue.

+2

We can't fix the i18n issue through a security patch, so as it is broken already we can continue to keep it as-is.

Woops. Not sure how I missed that. Thank you.

It seems that the plural syntax is currently broken on that message so that's a different issue.

Deployed

Jly renamed this task from Special:PendingChanges vulnerable to i18n XSS to CVE-2025-53491: Special:PendingChanges vulnerable to i18n XSS.Jun 30 2025, 7:20 PM
Jly claimed this task.
Jly added a subscriber: gerritbot.

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

[mediawiki/extensions/FlaggedRevs@master] Security: Escape rawElement content

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

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

[mediawiki/extensions/FlaggedRevs@REL1_44] Security: Escape rawElement content

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

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

[mediawiki/extensions/FlaggedRevs@REL1_43] Security: Escape rawElement content

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

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

[mediawiki/extensions/FlaggedRevs@REL1_42] Security: Escape rawElement content

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

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

[mediawiki/extensions/FlaggedRevs@REL1_39] Security: Escape rawElement content

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

Change #1165933 abandoned by Jly:

[mediawiki/extensions/FlaggedRevs@REL1_42] Security: Escape rawElement content

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

Change #1165934 abandoned by Jly:

[mediawiki/extensions/FlaggedRevs@REL1_39] Security: Escape rawElement content

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

Change #1165932 abandoned by Jly:

[mediawiki/extensions/FlaggedRevs@REL1_43] Security: Escape rawElement content

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

Change #1165933 restored by Jly:

[mediawiki/extensions/FlaggedRevs@REL1_42] Security: Escape rawElement content

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

Change #1165932 restored by Jly:

[mediawiki/extensions/FlaggedRevs@REL1_43] Security: Escape rawElement content

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

Change #1165933 abandoned by Jly:

[mediawiki/extensions/FlaggedRevs@REL1_42] Security: Escape rawElement content

Reason:

Not supported in 1.42

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

Change #1165932 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@REL1_43] SECURITY: Escape rawElement content

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

Change #1165929 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@master] SECURITY: Escape rawElement content

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

Change #1165930 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@REL1_44] SECURITY: Escape rawElement content

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

Jly removed a project: Patch-For-Review.
sbassett changed the visibility from "Custom Policy" to "Public (No Login Required)".Jul 7 2025, 5:18 PM
sbassett changed the edit policy from "Custom Policy" to "All Users".

I can help with tickets like this. Speaking generally, feel free to add me to security tickets for PageTriage, SecurePoll, and FlaggedRevs. Those are the 3 extensions I'm watching and focusing on at the moment.

SecurityPatchBot raised the priority of this task from Low to Unbreak Now!.

Patch 01-T394397.patch is currently failing to apply for the most recent code in the mainline branch of extensions/FlaggedRevs. This is blocking MediaWiki release 1.45.0-wmf.9(T392179)

If the patch needs to be rebased

To unblock the release, a new version of the patch can be placed at the right location in the deployment server with the following Scap command:

REVISED_PATCH=<path_to_revised_patch>
scap update-patch --message-body 'Rebase to solve merge conflicts with mainline code' /srv/patches/1.45.0-wmf.9/extensions/FlaggedRevs/01-T394397.patch "$REVISED_PATCH"

If the patch has been made public

To unblock the release, the patch can be removed for the right version from the deployment server with the following Scap command:

scap remove-patch --message-body 'Remove patch already made public' /srv/patches/1.45.0-wmf.9/extensions/FlaggedRevs/01-T394397.patch

(Note that if patches for the version don't exist yet, they will be created and the patch you specified removed)

Dreamy_Jazz lowered the priority of this task from Unbreak Now! to Low.

Removed the security patch as it's merged in the master branch