Loading...
Skip to main content

CVE-2025-61682 — Vulnerability in mediawiki/semantic-media-wiki —...

HIGH

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

Published September 18, 2026Updated September 18, 2026Source: osv

Summary

### 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: ```html {{#tag:div| |class=smw-subtab |data-subtab=""<img src='' onerror=alert(1)>"" }} ``` 2. Visit the page <img width="991" height="465" alt="image" src="https://github.com/user-attachments/assets/5d28d852-72d6-41dc-a59a-faac1610015f" /> <img width="497" height="69" alt="image" src="https://github.com/user-attachments/assets/02309390-0b40-46d9-b690-de8cd25dba59" /> ### Impact Arbitrary HTML can be inserted into the DOM by any user with the `edit` right, allowing for JavaScript to be executed.

Advisory Timeline

  • First published September 18, 2026 (24 days ago).
  • Last revised September 18, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update mediawiki/semantic-media-wiki to 7.0.0 or later
composer require "mediawiki/semantic-media-wiki:^7.0.0"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: packagist (1).

PackageEcosystemAffectedFixed In
mediawiki/semantic-media-wiki
packagist
3.1.0, 3.1.1, 3.1.2, 3.1.3 (+23 more)7.0.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.6 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
Low

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L

Frequently Asked Questions

What is CVE-2025-61682?
Semantic MediaWiki vulnerable to stored XSS through wikitext via improper use of non-reserved data attributes This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.6/10).
How do I check if my project is affected by CVE-2025-61682?
CVE-2025-61682 affects mediawiki/semantic-media-wiki. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-61682 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.6

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-hg8h-557g-q8pp

Related CVEs

  • CVE-2026-65954
    HIGH

    PHPCSUtils: Remote code execution via eval() in AbstractArrayDeclarationSniff::getActualArrayKey()

  • CVE-2026-61825
    HIGH

    code16/sharp has a stored XSS via data-html-content Sanitizer Bypass

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies