Categories
CVE-2025-61682 high CVSS 8.6

Cross-Site Scripting (XSS) in mediawiki/semantic-media-wiki (CVE-2025-61682)

Summary

Cross-site scripting in mediawiki/semantic-media-wiki (CVE-2025-61682). Confidential information can be exposed externally. Exploitable via ext.smw.js. Mitigation: upgrade to 7.0.0 or later.

Original description

The description as published by the source.

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 ", but it will be decoded when it is retrieved through .dataset) value of the data-subtab attribute in the payload is "". This is valid JSON and returns a string with `` when being decoded.

PoC

  1. Create a page with the following contents:
{{#tag:div|
|class=smw-subtab
|data-subtab=""""
}}
  1. Visit the page

Impact

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

Source: NIST National Vulnerability Database NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2025-61682 has been found in mediawiki/semantic-media-wiki.
Attackers can target a specific entry point like ext.smw.js over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 8.6/10.
What to do: upgrade mediawiki/semantic-media-wiki to 7.0.0 or later.
If unsure, ask your IT team or search "mediawiki/semantic-media-wiki CVE-2025-61682" on the vendor's site.

CVE-2025-61682 (mediawiki/semantic-media-wiki) — CWE-79 / CVSS v3 8.6
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: ext.smw.js / innerHTML / edit
Patched: 7.0.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

Cross-site scripting (XSS) (CWE-79) exists in mediawiki/semantic-media-wiki. Attackers reach the vulnerable code path via ext.smw.js without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of mediawiki/semantic-media-wiki. Attack surface: ext.smw.js / innerHTML / edit.

🔥 Severity

Severity: High (CVSS 8.6/10). Confidential information can be exposed externally.

🔧 How to fix

Update to 7.0.0.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'mediawiki/semantic-media-wiki' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'mediawiki/semantic-media-wiki' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で mediawiki/semantic-media-wiki を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade mediawiki/semantic-media-wiki to 7.0.0

    ステージング環境で 7.0.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

composer mediawiki/semantic-media-wiki
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.0.0"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details