Semantic MediaWiki vulnerable to stored XSS through wikitext via improper use of non-reserved data attributes
High severity. Published 18 September 2026. Update mediawiki/semantic-media-wiki to 7.0.0 or later: composer update mediawiki/semantic-media-wiki.
Which versions are affected?
| Package | Affected versions | Fixed in |
|---|---|---|
| mediawiki/semantic-media-wiki (opens in a new tab) | >= 3.1.0, < 7.0.0 | 7.0.0 |
What should you do?
Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:
composer show mediawiki/semantic-media-wiki
composer auditAdvisory details
| Severity | HighCVSS 8.6 |
|---|---|
| Published | |
| Updated | |
| CVE | CVE-2025-61682 (opens in a new tab) |
| GHSA | GHSA-hg8h-557g-q8pp (opens in a new tab) |
| Weakness | CWE-79 |
What the advisory says
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.jsL37-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.
Source: GHSA-hg8h-557g-q8pp (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .
Other recent advisories for this package
- Semantic MediaWiki has a query debug output XSS (`DebugFormatter`) (opens in a new tab) (medium, 18 September 2026)
- Semantic MediaWiki'a missing authorization in the smwtask API module allows unauthenticated access to admin-only maintenance tasks (high, 18 September 2026)
- Semantic MediaWiki has an open redirect in Special:URIResolver (opens in a new tab) (medium, 18 September 2026)
- Semantic MediaWiki affected by reflected XSS in `Special:Ask` via a forged cursor pagination token (opens in a new tab) (medium, 18 September 2026)
- Semantic MediaWiki's Special:FacetedSearch cstate hidden inputs enable reflected XSS (residual of CVE-2025-10354) (opens in a new tab) (medium, 18 September 2026)