Skip to content

XSS in TabberTransclude in Extension:TabberNeue

High
alistair3149 published GHSA-4x6x-8rm8-c37j Jan 4, 2025

Package

TabberNeue (MediaWiki)

Affected versions

>= d8c3db4e5935476e496d979fb01f775d3d3282e6

Patched versions

>= f229cab099c69006e25d4bad3579954e481dc566

Description

Summary

There are several sources of arbitrary, unescaped user input being used to construct HTML, which allows any user that can edit pages or otherwise render wikitext to XSS other users.

Edit: Only the first XSS can be reproduced in production.

Details

✅ Verified and patched in f229cab

$tabBody = sprintf( '<div class="error">Invalid title: %s</div>', $pageName );

This doesn't escape the user-supplied page name when outputting, so an XSS payload as the page name can be used here.

This was caused by d8c3db4.


❌ Invalid as MediaWiki parser sanitizes dangerous HTML

return $parser->recursiveTagParse( $content, $frame );

The documentation for Parser::recursiveTagParse() states that it returns unsafe HTML, and the $content being supplied is from user input.

This was caused by 9535181.


❌ Invalid as TabberParsoid is not being used

return '<article class="tabber__panel" title="' . $tabName .

This uses unescaped user input as the attribute of an element, thus allowing the user to break out of the attribute or element and injecting arbitrary attributes to the element, or inserting new ones (such as a script tag).

This was caused by 8278e66.

PoC

For the first XSS, render the following wikitext (whether it be through saving it to a page and viewing it, or via Special:ExpandTemplates):

<tabbertransclude>
<script>alert(1)</script> | hehe
</tabbertransclude>

For the second XSS, I have given up attempting to reproduce it after over twenty minutes of "surfing through the internals of the MediaWiki parser fishing for an XSS out of this giant contraption as I bring myself deeper and deeper into the cogs of the machine that no one knows how to maintain or fully operate ever since its conception".

For the third XSS, this is unreachable as the class is never used, though it should be fixed anyway (or the file removed).

Impact

Any user with the ability to cause another user to render wikitext (such as viewing a page that the user can edit, or an attacker tricking the victim to click on a link to Special:ExpandTemplates with the malicious wikitext in the wpInput parameter) can XSS said user.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L

CVE ID

CVE-2025-21612

Credits