{"id":"CVE-2025-61682","aliases":["CVE-2025-61682","GHSA-hg8h-557g-q8pp"],"related":[],"kind":"vulnerability","state":"published","title":"Semantic MediaWiki vulnerable to stored XSS through wikitext via improper use of non-reserved data attributes","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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 `&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.\n\n### PoC\n\n1. Create a page with the following contents:\n```html\n{{#tag:div|\n|class=smw-subtab\n|data-subtab=\"\"<img src='' onerror=alert(1)>\"\"\n}}\n```\n2. Visit the page\n\n<img width=\"991\" height=\"465\" alt=\"image\" src=\"https://github.com/user-attachments/assets/5d28d852-72d6-41dc-a59a-faac1610015f\" />\n<img width=\"497\" height=\"69\" alt=\"image\" src=\"https://github.com/user-attachments/assets/02309390-0b40-46d9-b690-de8cd25dba59\" />\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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Semantic MediaWiki es una extensión gratuita y de código abierto para MediaWiki que permite a los usuarios almacenar y consultar datos dentro de las páginas de la wiki. Versiones a partir de la 3.1.0 y anteriores a la 7.0.0 insertan el valor no saneado de un atributo de datos en el DOM como HTML, lo que permite XSS almacenado a través de wikitexto. La versión 7.0.0 corrige el problema.","source":"nvd"}],"published":"2026-09-18T16:07:29.000Z","modified":"2026-10-14T13:10:00.187Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L","score":8.6,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L","score":8.6,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L","score":8.6,"rating":"HIGH"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 3.1.0, < 7.0.0","status":"affected"}],"vendor":"SemanticMediaWiki","product":"SemanticMediaWiki","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"3.1.0","status":"affected","fixed":"7.0.0"}],"ecosystem":"Packagist","package":"mediawiki/semantic-media-wiki","purl":"pkg:composer/mediawiki/semantic-media-wiki","source":"ghsa"}],"references":[{"url":"https://github.com/SemanticMediaWiki/SemanticMediaWiki/security/advisories/GHSA-hg8h-557g-q8pp","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/SemanticMediaWiki/SemanticMediaWiki/releases/tag/7.0.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/SemanticMediaWiki/SemanticMediaWiki","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-09-18T17:23:36.648Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-61682","url":"https://www.cve.org/CVERecord?id=CVE-2025-61682","licence":"CVE Terms of Use","modified":"2026-09-18T17:23:49.754Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hg8h-557g-q8pp","url":"https://github.com/advisories/GHSA-hg8h-557g-q8pp","licence":"CC-BY-4.0","modified":"2026-09-18T16:16:22.786Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-61682","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-61682","licence":"Public domain","modified":"2026-10-14T13:10:00.187Z"}],"updatedAt":"2026-11-25T22:59:12.509Z","epss":{"score":0.00292,"percentile":0.23478,"date":"2026-12-01T12:00:22.000Z"}}