Page MenuHomePhabricator

CVE-2026-103047 i18n message that is not in $wgRawHtmlMessages unsafely used in CentralAuth in uncommon configuration.
Closed, ResolvedPublicSecurity

Description

If you have multiple non-API only session providers installed, then someone with editinterface (but not editsitejs rights) can trigger an XSS in CentralAuth on Special:CentralAutoLogin/checkLoggedIn (Automatically loaded for anons. Also triggerable on some other Special:CentralAutoLogin subpages). This is an obscure configuration, which as of this writing does not include Wikimedia.

Anyways: line 657 of CentralAuth/includes/specials/SpecialCentralAutoLogin.php doFinalOutput() - echo "/* $status */\n$body"; $status should be escaped. In checkSession() [line 81], this will output an i18n message if a different session handler other than CentralAuth is present. Normally the i18n message is sessionprovider- followed by name of the class. Admins can adjust this message in order to inject javascript. The fact that this special page is not available via the API, and most alternative session handlers are API only, limits the applicability of this bug.

I'd recommend removing the / and * characters from $status.

Event Timeline

Reedy triaged this task as Low priority.Feb 10 2020, 4:26 PM
Reedy added a project: Vuln-XSS.
Reedy moved this task from Incoming to Watching on the Security-Team board.

Assuming I understand https://tc39.es/ecma262/2026/#sec-comments correctly (and assuming that is the correct version of the spec), removing * and / does indeed seem like a good solution.

(Re-adding Security-Team so they can decide on whether this should be deployed or go through gerrit at some point, given that it doesn't seem to affect the WMF, unless this has changed since this task was created)

+1 to going through Gerrit. Doesn't affect Wikimedia wikis, admin-only vulnerabilities are not that severe on most non-Wikimedia wikis as you don't have low-trust admins, and it would require a very unusual setup where you use CentralAuth + another generic-purpose session provider (Auth_remoteuser, AuthWP, PluggableSSO are the only ones I think?) which probably wouldn't even work together.

The patch looks reasonable, but I agree it can just go through gerrit.

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

[mediawiki/extensions/CentralAuth@master] SECURITY: Fix JS injection through status messages

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

Change #1309285 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] SECURITY: Fix JS injection through status messages

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

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

[mediawiki/extensions/CentralAuth@REL1_46] SECURITY: Fix JS injection through status messages

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

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

[mediawiki/extensions/CentralAuth@REL1_45] SECURITY: Fix JS injection through status messages

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

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

[mediawiki/extensions/CentralAuth@REL1_44] SECURITY: Fix JS injection through status messages

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

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

[mediawiki/extensions/CentralAuth@REL1_43] SECURITY: Fix JS injection through status messages

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

Change #1309294 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@REL1_46] SECURITY: Fix JS injection through status messages

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

Change #1309297 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@REL1_43] SECURITY: Fix JS injection through status messages

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

Change #1309296 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@REL1_44] SECURITY: Fix JS injection through status messages

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

Change #1309295 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@REL1_45] SECURITY: Fix JS injection through status messages

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

Catrope renamed this task from i18n message that is not in $wgRawHtmlMessages unsafely used in CentralAuth in uncommon configuration. to CVE-2026-103047 i18n message that is not in $wgRawHtmlMessages unsafely used in CentralAuth in uncommon configuration..Sep 29 2026, 11:00 PM
sbassett moved this task from Watching to Our Part Is Done on the Security-Team board.
sbassett changed Author Affiliation from N/A to Wikimedia Communities.
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.