{"id":"CVE-2025-61682","aliases":["EUVD-2025-210943","GHSA-hg8h-557g-q8pp"],"status":"published","title":"Semantic MediaWiki vulnerable to stored XSS through wikitext via improper use of non-reserved data attributes","description":"Semantic MediaWiki is a free, open-source extension to MediaWiki that lets users store and query data within the wiki's pages. Versions starting in 3.1.0 and prior to 7.0.0 insert the unsanitized value of a data attribute into the DOM as HTML, allowing for stored XSS through wikitext. Version 7.0.0 patches the issue.","severity":{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00401,"percentile":0.34614,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2026-09-18T16:07:29Z","modified":"2026-10-28T02:30:53Z","fixes":[{"ecosystem":"Packagist","package":"mediawiki/semantic-media-wiki","fixed_in":["7.0.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"mediawiki/semantic-media-wiki","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.1.0"},{"fixed":"7.0.0"}]}]},{"source":"osv","ecosystem":"Packagist","package":"mediawiki/semantic-media-wiki","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.1.0"},{"fixed":"7.0.0"}]}],"versions":["3.1.0","3.1.1","3.1.2","3.1.3","3.1.4","3.1.5","3.1.6","3.2.0","3.2.0-rc.1","3.2.0-rc.2","3.2.1","3.2.2","3.2.3","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.0.0","5.0.1","5.0.2","5.1.0","6.0.0","6.0.1"]}],"products":[{"vendor":"semanticmediawiki","product":"semanticmediawiki"}],"references":[{"url":"https://github.com/SemanticMediaWiki/SemanticMediaWiki/security/advisories/GHSA-hg8h-557g-q8pp","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/SemanticMediaWiki/SemanticMediaWiki/releases/tag/7.0.0","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/advisories/GHSA-hg8h-557g-q8pp"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/61xxx/CVE-2025-61682.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-61682","tags":["advisory"]},{"url":"https://github.com/SemanticMediaWiki/SemanticMediaWiki","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2025-61682","title":"Semantic MediaWiki vulnerable to stored XSS through wikitext via improper use of non-reserved data attributes","description":"Semantic MediaWiki is a free, open-source extension to MediaWiki that lets users store and query data within the wiki's pages. Versions starting in 3.1.0 and prior to 7.0.0 insert the unsanitized value of a data attribute into the DOM as HTML, allowing for stored XSS through wikitext. Version 7.0.0 patches the issue.","status":"published","published":"2026-09-18T16:09:06.88Z","modified":"2026-09-18T17:23:49.754Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L","level":"high","assessor":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:32:44.763463Z"}],"euvd":[{"id":"EUVD-2025-210943","description":"Semantic MediaWiki is a free, open-source extension to MediaWiki that lets users store and query data within the wiki's pages. Versions starting in 3.1.0 and prior to 7.0.0 insert the unsanitized value of a data attribute into the DOM as HTML, allowing for stored XSS through wikitext. Version 7.0.0 patches the issue.","status":"published","published":"2026-09-18T16:09:06Z","modified":"2026-09-18T17:23:49Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L","level":"high"}],"updated_at":"2026-11-02T17:28:08.412343Z"}],"ghsa":[{"id":"GHSA-hg8h-557g-q8pp","title":"Semantic MediaWiki vulnerable to stored XSS through wikitext via improper use of non-reserved data attributes","description":"### Summary\nThe SemanticMediaWiki extension inserts the unsanitized value of a data attribute into the DOM as HTML, allowing for stored XSS through wikitext.\n\n### Details\n\nIn `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:\nhttps://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/62f1fa765b626e21d88999b97a3e8029db9fd385/res/smw/ext.smw.js#L37-L42\nHowever, 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.\nThe decoded (`\"` will turn to `\u0026quot;`, but it will be decoded when it is retrieved through `.dataset`) value of the `data-subtab` attribute in the payload is `\"\u003cimg src='' onerror=alert(1)\u003e\"`. This is valid JSON and returns a string with `\u003cimg src='' onerror=alert(1)\u003e` when being decoded.\n\n### PoC\n\n1. Create a page with the following contents:\n```html\n{{#tag:div|\n|class=smw-subtab\n|data-subtab=\"\"\u003cimg src='' onerror=alert(1)\u003e\"\"\n}}\n```\n2. Visit the page\n\n\u003cimg width=\"991\" height=\"465\" alt=\"image\" src=\"https://github.com/user-attachments/assets/5d28d852-72d6-41dc-a59a-faac1610015f\" /\u003e\n\u003cimg width=\"497\" height=\"69\" alt=\"image\" src=\"https://github.com/user-attachments/assets/02309390-0b40-46d9-b690-de8cd25dba59\" /\u003e\n\n### Impact\n\nArbitrary HTML can be inserted into the DOM by any user with the `edit` right, allowing for JavaScript to be executed.","status":"published","published":"2026-09-18T16:07:29Z","modified":"2026-09-18T16:07:32Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L","level":"high"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:41:18.357514Z"}],"nvd":[{"id":"CVE-2025-61682","description":"Semantic MediaWiki is a free, open-source extension to MediaWiki that lets users store and query data within the wiki's pages. Versions starting in 3.1.0 and prior to 7.0.0 insert the unsanitized value of a data attribute into the DOM as HTML, allowing for stored XSS through wikitext. Version 7.0.0 patches the issue.","status":"published","published":"2026-09-18T16:17:03.717Z","modified":"2026-10-14T13:10:00.187Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L","level":"high","assessor":"secondary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:12:03.20248Z"}],"osv":[{"id":"CVE-2025-61682","title":"Semantic MediaWiki vulnerable to stored XSS through wikitext via improper use of non-reserved data attributes","description":"Semantic MediaWiki is a free, open-source extension to MediaWiki that lets users store and query data within the wiki's pages. Versions starting in 3.1.0 and prior to 7.0.0 insert the unsanitized value of a data attribute into the DOM as HTML, allowing for stored XSS through wikitext. Version 7.0.0 patches the issue.","status":"published","published":"2026-09-18T16:09:06.88Z","modified":"2026-10-28T02:30:53.688795993Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L","level":"high"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:44:51.516975Z"},{"id":"GHSA-hg8h-557g-q8pp","title":"Semantic MediaWiki vulnerable to stored XSS through wikitext via improper use of non-reserved data attributes","description":"### Summary\nThe SemanticMediaWiki extension inserts the unsanitized value of a data attribute into the DOM as HTML, allowing for stored XSS through wikitext.\n\n### Details\n\nIn `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:\nhttps://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/62f1fa765b626e21d88999b97a3e8029db9fd385/res/smw/ext.smw.js#L37-L42\nHowever, 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.\nThe decoded (`\"` will turn to `\u0026quot;`, but it will be decoded when it is retrieved through `.dataset`) value of the `data-subtab` attribute in the payload is `\"\u003cimg src='' onerror=alert(1)\u003e\"`. This is valid JSON and returns a string with `\u003cimg src='' onerror=alert(1)\u003e` when being decoded.\n\n### PoC\n\n1. Create a page with the following contents:\n```html\n{{#tag:div|\n|class=smw-subtab\n|data-subtab=\"\"\u003cimg src='' onerror=alert(1)\u003e\"\"\n}}\n```\n2. Visit the page\n\n\u003cimg width=\"991\" height=\"465\" alt=\"image\" src=\"https://github.com/user-attachments/assets/5d28d852-72d6-41dc-a59a-faac1610015f\" /\u003e\n\u003cimg width=\"497\" height=\"69\" alt=\"image\" src=\"https://github.com/user-attachments/assets/02309390-0b40-46d9-b690-de8cd25dba59\" /\u003e\n\n### Impact\n\nArbitrary HTML can be inserted into the DOM by any user with the `edit` right, allowing for JavaScript to be executed.","status":"published","published":"2026-09-18T16:07:29Z","modified":"2026-09-18T16:16:22.786238455Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L","level":"high"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:49.28217Z"}]}}
