{"id":"GHSA-7h5p-637f-jfr7","summary":"StarCitizenWiki Extension Embed Video: Stored XSS via unsanitized class passed to template","details":"### Summary\nThe user supplied class value is fed directly into the sprintf call that creates HTML. You can add a quote to escape the class and then inject arbitrary html/javascript to the final output.\n\n### Details\nThe template [here](https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo/blob/a573a16d925ee0ea0d34b360856dc8ab0b88f822/includes/EmbedService/EmbedHtmlFormatter.php#L138) adds a figure with a class that is substituted in. This value is provided to sprintf [here](https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo/blob/a573a16d925ee0ea0d34b360856dc8ab0b88f822/includes/EmbedService/EmbedHtmlFormatter.php#L156), an unescaped version of the class supplied by the user.\n\n```\n$template = \u003c\u003c\u003cHTML\n    \u003cfigure class=\"%s\" data-service=\"%s\" %s %s\u003e\n        \u003cdiv class=\"embedvideo-wrapper\" %s\u003e%s%s%s\u003c/div\u003e%s\n    \u003c/figure\u003e\nHTML;\n```\n\n### PoC\nNote the double quote immediately following the single quote to escape the class attribute in the template:\n```\n\u003cyoutube class='\" onmouseover=\"alert(document.domain)' id=\"dQw4w9WgXcQ\"\u003edQw4w9WgXcQ\u003c/youtube\u003e\n```\n\n### Impact\nArbitrary HTML can be inserted into the DOM by any user on any page, allowing for JavaScript to be executed.","aliases":["CVE-2026-55691"],"modified":"2026-09-10T03:50:48.730623590Z","published":"2026-06-19T21:15:03Z","database_specific":{"github_reviewed_at":"2026-06-19T21:15:03Z","nvd_published_at":null,"cwe_ids":["CWE-79","CWE-80"],"severity":"HIGH","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo/security/advisories/GHSA-7h5p-637f-jfr7"},{"type":"WEB","url":"https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo/commit/370156335b325bb81d14d89edf0a1f2643d50a84"},{"type":"PACKAGE","url":"https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo"},{"type":"WEB","url":"https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo/releases/tag/v4.1.0"}],"affected":[{"package":{"name":"starcitizenwiki/embedvideo","ecosystem":"Packagist","purl":"pkg:composer/starcitizenwiki/embedvideo"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.1.0"}]}],"versions":["3.0.0","3.0.1","3.0.2","3.0.3","3.0.4","3.0.5","3.0.6","3.0.7","3.0.8","3.0.9","3.1.0","3.2.0","3.2.1","3.2.2","3.2.3","3.2.4","3.2.5","3.2.6","3.2.7","3.2.8","3.3.0","3.4.0","3.4.1","3.4.2","3.4.3","4.0.0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-7h5p-637f-jfr7/GHSA-7h5p-637f-jfr7.json","last_known_affected_version_range":"\u003c= 4.0.0"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L"}]}