CVE-2025-61682: Semantic MediaWiki vulnerable to stored XSS through wikitext via improper use of non-reserved data attributes
Summary The SemanticMediaWiki extension inserts the unsanitized value of a data attribute into the DOM as HTML, allowing for stored XSS through wikitext. Details In ext.smw.js, the data-subtab attribute of all elements with the smw-subtab class is parsed as JSON and appended to the innerHTML of the element:…
Published Sep 18, 2026
Affected packages
mediawiki/semantic-media-wiki
- Ecosystem
- Composer (PHP)
- Affected
- >= 3.1.0, < 7.0.0
- Fixed in
- 7.0.0
- Check
composer show mediawiki/semantic-media-wiki
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
The SemanticMediaWiki extension inserts the unsanitized value of a data attribute into the DOM as HTML, allowing for stored XSS through wikitext.
Details
In ext.smw.js, the data-subtab attribute of all elements with the smw-subtab class is parsed as JSON and appended to the innerHTML of the element: https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/62f1fa765b626e21d88999b97a3e8029db9fd385/res/smw/ext.smw.js#L37-L42 However, most data attributes (except for reserved ones) like data-subtab can be used in wikitext. Therefore, it is possible to insert arbitrary HTML and JS through wikitext. The decoded (" will turn to ", but it will be decoded when it is retrieved through .dataset) value of the data-subtab attribute in the payload is "". This is valid JSON and returns a string with `` when being decoded.
PoC
- Create a page with the following contents:
{{#tag:div|
|class=smw-subtab
|data-subtab=""""
}}- Visit the page
Impact
Arbitrary HTML can be inserted into the DOM by any user with the edit right, allowing for JavaScript to be executed.
Credited to SomeMWDev.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2026-77606
Semantic MediaWiki has reflected XSS in Special:Ask plain table headers
medium6.1Sep 18, 2026CVE-2026-77607
Semantic MediaWiki affected by Special:Ask table `sep` parameter reflected XSS
medium6.1Sep 18, 2026CVE-2026-77608
Semantic MediaWiki has reflected XSS in `Special:SearchByProperty` (`property` and `value` parameters)
medium6.1Sep 18, 2026CVE-2026-77609
Semantic MediaWiki has an open redirect in Special:URIResolver
medium6.1Sep 18, 2026CVE-2026-77610
Semantic MediaWiki has a query debug output XSS (`DebugFormatter`)
medium6.1Sep 18, 2026CVE-2026-77616
Semantic MediaWiki affected by reflected XSS in `Special:Ask` via a forged cursor pagination token
medium6.1Sep 18, 2026
