Page MenuHomePhabricator

AjaxPoll extension has i18n message XSS in several places
Closed, DuplicatePublicSecurity

Description

AjaxPoll extension does not escape i18n messages in various places:

They can all be used to perform cross-site scripting by those who can edit interface messages.

Details

Risk Rating
Low
Author Affiliation
Wikimedia Communities

Event Timeline

Pls. can you let me know (example) what I need to change in order to fix the issue? I haven't been working on the code since a long time.

The simplest solution is probably to use ->parse() instead of ->text()->parse() will HTML-escape any unsafe constructs in the input, and the result is safe to use in Html::rawElement(). (But this might be problematic if some of the messages contain things that shouldn’t be parsed as wikitext.)

The simplest solution is probably to use ->parse() instead of ->text()->parse() will HTML-escape any unsafe constructs in the input, and the result is safe to use in Html::rawElement(). (But this might be problematic if some of the messages contain things that shouldn’t be parsed as wikitext.)

Thanks. Will consider this a.s.a.p.

Since MW 1.32, there is also $wgRawHtmlMessages, which requires some additional rights over editinterface for users to edit potentially-sensitive messages. This would be more of a middle ground between @Lucas_Werkmeister_WMDE's suggestion and the status quo.

sbassett closed this task as a duplicate of T389590: CVE-2025-32070:XSSes in AJAXPoll.
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.