GHSA-hg8h-557g-q8pp

Suggest an improvement
Source
https://github.com/advisories/GHSA-hg8h-557g-q8pp
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-hg8h-557g-q8pp/GHSA-hg8h-557g-q8pp.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-hg8h-557g-q8pp
Aliases
Published
2026-09-18T16:07:29Z
Modified
2026-09-18T16:15:09Z
Severity
  • 8.6 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L CVSS Calculator
Summary
Semantic MediaWiki vulnerable to stored XSS through wikitext via improper use of non-reserved data attributes
Details

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 &quot;, but it will be decoded when it is retrieved through .dataset) value of the data-subtab attribute in the payload is "<img src='' onerror=alert(1)>". This is valid JSON and returns a string with <img src='' onerror=alert(1)> when being decoded.

PoC

  1. Create a page with the following contents:
{{#tag:div|
|class=smw-subtab
|data-subtab=""<img src='' onerror=alert(1)>""
}}
  1. Visit the page
image image

Impact

Arbitrary HTML can be inserted into the DOM by any user with the edit right, allowing for JavaScript to be executed.

Database specific
{
    "cwe_ids":  [
        "CWE-79"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-09-18T16:07:29Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

Packagist / mediawiki/semantic-media-wiki

Package

Name
mediawiki/semantic-media-wiki
Purl
pkg:composer/mediawiki/semantic-media-wiki

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.1.0
Fixed
7.0.0

Affected versions

3.*
3.1.0
3.1.1
3.1.2
3.1.3
3.1.4
3.1.5
3.1.6
3.2.0-rc.1
3.2.0-rc.2
3.2.0
3.2.1
3.2.2
3.2.3
4.*
4.0.0
4.0.1
4.0.2
4.1.0
4.1.1
4.1.2
4.1.3
4.2.0
5.*
5.0.0
5.0.1
5.0.2
5.1.0
6.*
6.0.0
6.0.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-hg8h-557g-q8pp/GHSA-hg8h-557g-q8pp.json"