# Semantic MediaWiki vulnerable to stored XSS through wikitext via improper use of non-reserved data attributes

High severity, published 2026-09-18. Update mediawiki/semantic-media-wiki to 7.0.0 or later: composer update mediawiki/semantic-media-wiki.

Canonical URL: https://buzzphp.com/security/ghsa-hg8h-557g-q8pp · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 8.6) |
| Published | 2026-09-18 |
| Updated | 2026-09-18 |
| CVE | [CVE-2025-61682](https://nvd.nist.gov/vuln/detail/CVE-2025-61682) |
| GHSA | [GHSA-hg8h-557g-q8pp](https://github.com/advisories/GHSA-hg8h-557g-q8pp) |
| Weakness | CWE-79 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| mediawiki/semantic-media-wiki | >= 3.1.0, < 7.0.0 | 7.0.0 |

## What to do

Update mediawiki/semantic-media-wiki to 7.0.0 or later: composer update mediawiki/semantic-media-wiki.

Check which version you run with `composer show mediawiki/semantic-media-wiki`, and every affected package with `composer audit`.

## About this advisory

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.

## Links

- [GHSA-hg8h-557g-q8pp on GitHub](https://github.com/advisories/GHSA-hg8h-557g-q8pp)
- [CVE-2025-61682 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2025-61682)
- [All Composer security advisories](https://buzzphp.com/security)
