Summary
CVE-2025-61682 is a stored cross-site scripting (XSS) vulnerability in the Semantic MediaWiki extension, a widely used MediaWiki add-on for structured, semantic data. The flaw allows unsanitized values from non-reserved HTML data attributes in wikitext to be inserted directly into the page DOM as HTML, enabling any user with edit permissions to store and execute arbitrary JavaScript. The vulnerability has a CVSS v3.1 base score of 8.6 (High) and affects all deployments running the extension between versions 3.1.0 and 7.0.0.
Technical details
- Root cause: Semantic MediaWiki’s front-end code parses the
data-subtabHTML data attribute as JSON and appends the resulting value directly into the DOM viainnerHTML, without sanitizing or encoding it. - Trigger conditions: An attacker who can edit a wiki page (a low privilege bar on many wikis, including anonymous or low-trust contributor accounts on open wikis) crafts wikitext containing a specially formed non-reserved
data-attribute (e.g.,data-subtab) with malicious HTML/JavaScript payload. - Attack vector: Network-based (AV:N) and requires no user interaction (UI:N) beyond another user viewing the affected page; the payload is stored persistently and executes for any visitor who renders the compromised page.
- Impact: Successful exploitation results in stored XSS with high confidentiality impact and low integrity/availability impact — allowing session/cookie theft, credential harvesting, admin account takeover, defacement, or further pivoting within the wiki application, depending on the privileges of the victim who views the page.
Affected software
- Semantic MediaWiki extension versions >= 3.1.0 and < 7.0.0
Severity
- CVSS v3.1 Base Score: 8.6 (High)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L - CWE-79: Improper Neutralization of Input During Web Page Generation (‘Cross-site Scripting’)
Mitigation and recommended actions
- Immediate: Upgrade Semantic MediaWiki to version 7.0.0 or later, which contains the fix for this vulnerability.
- If immediate patching is not possible:
- Restrict page-edit permissions to trusted users only, reducing the pool of accounts that could inject a malicious payload.
- Enable and enforce a strict Content Security Policy (CSP) on the wiki to limit the impact of any injected inline scripts.
- Monitor recent page edits for unusual
data-attribute usage or embedded script-like content as an interim detective control. - Review MediaWiki extension configuration to disable or restrict features that render raw/unsanitized HTML from wikitext where feasible.

