{"id":"GHSA-w4fj-87j5-f25c","summary":"XWiki has Reflected Cross-Site Scripting (XSS) in page history compare","details":"### Impact\nA reflected cross-site scripting vulnerability (XSS) in the compare view between revisions of a page allows executing JavaScript code in the user's browser. If the current user is an admin, this can not only affect the current user but also the confidentiality, integrity and availability of the whole XWiki instance.\n\n### Patches\nThe problem has been patched by properly escaping the URL parameters.\n\n### Workarounds\nThe [patch](https://github.com/xwiki/xwiki-platform/commit/3c8a2ec985641367015c2db937574fcd360c788c#diff-a5e75a4e3820a63c02a32666dda67c73ee7885ab8e7f67e52cfcb3be5a13326e) can be applied manually to `templates/changesdoc.vm` in the deployed WAR.\n\n### Attribution\n\nXWiki thanks Mike Cole @mikecole-mg for discovering and reporting this vulnerability.","aliases":["CVE-2026-40105"],"modified":"2026-05-05T16:11:29.090127Z","published":"2026-04-14T22:33:56Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2026-04-14T22:33:56Z","nvd_published_at":"2026-04-15T04:17:48Z","cwe_ids":["CWE-80"],"severity":"MODERATE"},"references":[{"type":"WEB","url":"https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-w4fj-87j5-f25c"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40105"},{"type":"WEB","url":"https://github.com/xwiki/xwiki-platform/commit/3c8a2ec985641367015c2db937574fcd360c788c"},{"type":"PACKAGE","url":"https://github.com/xwiki/xwiki-platform"},{"type":"WEB","url":"https://jira.xwiki.org/browse/XWIKI-23472"}],"affected":[{"package":{"name":"org.xwiki.platform:xwiki-platform-web-templates","ecosystem":"Maven","purl":"pkg:maven/org.xwiki.platform/xwiki-platform-web-templates"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"10.4-rc-1"},{"fixed":"16.10.16"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-w4fj-87j5-f25c/GHSA-w4fj-87j5-f25c.json"}},{"package":{"name":"org.xwiki.platform:xwiki-platform-web-templates","ecosystem":"Maven","purl":"pkg:maven/org.xwiki.platform/xwiki-platform-web-templates"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"17.0.0-rc-1"},{"fixed":"17.4.8"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-w4fj-87j5-f25c/GHSA-w4fj-87j5-f25c.json"}},{"package":{"name":"org.xwiki.platform:xwiki-platform-web-templates","ecosystem":"Maven","purl":"pkg:maven/org.xwiki.platform/xwiki-platform-web-templates"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"17.5.0-rc-1"},{"fixed":"17.10.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-w4fj-87j5-f25c/GHSA-w4fj-87j5-f25c.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H"}]}