{"id":"CVE-2022-36097","aliases":["EUVD-2022-6764","GHSA-9r9j-57rf-f6vj"],"status":"published","title":"XWiki Platform Attachment UI vulnerable to cross-site scripting in the move attachment form","description":"XWiki Platform Attachment UI provides a macro to easily upload and select attachments for XWiki Platform, a generic wiki platform. Starting with version 14.0-rc-1 and prior to 14.4-rc-1, it's possible to store JavaScript in an attachment name, which will be executed by anyone trying to move the corresponding attachment. This issue has been patched in XWiki 14.4-rc-1. As a workaround, one may copy `moveStep1.vm` to `webapp/xwiki/templates/moveStep1.vm` and replace vulnerable code with code from the patch.","severity":{"version":"3.1","score":8.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-08","score":0.58162,"percentile":0.99097,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79","CWE-80"],"published":"2022-09-08T20:35:11Z","modified":"2026-10-28T10:35:55Z","fixes":[{"ecosystem":"Maven","package":"org.xwiki.platform:xwiki-platform-attachment-ui","fixed_in":["14.4-rc-1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Maven","package":"org.xwiki.platform:xwiki-platform-attachment-ui","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"14.0-rc-1"},{"fixed":"14.4-rc-1"}]}]},{"source":"osv","ecosystem":"Maven","package":"org.xwiki.platform:xwiki-platform-attachment-ui","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"14.0-rc-1"},{"fixed":"14.4-rc-1"}]}]}],"products":[{"vendor":"xwiki","product":"xwiki"},{"vendor":"xwiki","product":"xwiki-platform"}],"references":[{"url":"https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-9r9j-57rf-f6vj","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Third Party Advisory","advisory","web"]},{"url":"https://github.com/xwiki/xwiki-platform/commit/fbc4bfbae4f6ce8109addb281de86a03acdb9277","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://jira.xwiki.org/browse/XWIKI-19667","tags":["x_refsource_MISC","x_transferred","Exploit","Vendor Advisory","web"]},{"url":"https://raw.githubusercontent.com/xwiki/xwiki-platform/xwiki-platform-14.0-rc-1/xwiki-platform-core/xwiki-platform-attachment/xwiki-platform-attachment-api/src/main/resources/templates/attachment/moveStep1.vm","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-36097","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-9r9j-57rf-f6vj"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/36xxx/CVE-2022-36097.json","tags":["advisory"]},{"url":"https://github.com/xwiki/xwiki-platform","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2022-36097","title":"XWiki Platform Attachment UI vulnerable to cross-site scripting in the move attachment form","description":"XWiki Platform Attachment UI provides a macro to easily upload and select attachments for XWiki Platform, a generic wiki platform. Starting with version 14.0-rc-1 and prior to 14.4-rc-1, it's possible to store JavaScript in an attachment name, which will be executed by anyone trying to move the corresponding attachment. This issue has been patched in XWiki 14.4-rc-1. As a workaround, one may copy `moveStep1.vm` to `webapp/xwiki/templates/moveStep1.vm` and replace vulnerable code with code from the patch.","status":"published","published":"2022-09-08T20:35:11Z","modified":"2025-04-22T17:22:54.187Z","cvss":[{"version":"3.1","score":8.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","level":"high","assessor":"cna"}],"cwes":["CWE-79","CWE-80"],"updated_at":"2026-11-02T14:34:35.615708Z"}],"euvd":[{"id":"EUVD-2022-6764","description":"XWiki Platform Attachment UI provides a macro to easily upload and select attachments for XWiki Platform, a generic wiki platform. Starting with version 14.0-rc-1 and prior to 14.4-rc-1, it's possible to store JavaScript in an attachment name, which will be executed by anyone trying to move the corresponding attachment. This issue has been patched in XWiki 14.4-rc-1. As a workaround, one may copy `moveStep1.vm` to `webapp/xwiki/templates/moveStep1.vm` and replace vulnerable code with code from the patch.","status":"published","published":"2022-09-08T20:35:11Z","modified":"2025-04-22T17:22:54Z","cvss":[{"version":"3.1","score":8.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","level":"high"}],"updated_at":"2026-11-02T20:52:16.055056Z"}],"ghsa":[{"id":"GHSA-9r9j-57rf-f6vj","title":"XWiki Platform Attachment UI vulnerable to cross-site scripting in the move attachment form","description":"### Impact\n\nIt's possible to store JavaScript in an attachment name, which will be executed by anyone trying to move the corresponding attachment.\n\nFor example, an attachment with name `\u003e\u003cimg src=1 onerror=alert(1)\u003e.jpg` will execute the alert.\n\n### Patches\nThis issue has been patched in XWiki 14.4RC1.\n\n### Workarounds\nIt is possible to fix the vulnerability by copying [moveStep1.vm](https://raw.githubusercontent.com/xwiki/xwiki-platform/xwiki-platform-14.0-rc-1/xwiki-platform-core/xwiki-platform-attachment/xwiki-platform-attachment-api/src/main/resources/templates/attachment/moveStep1.vm) to `webapp/xwiki/templates/moveStep1.vm` and replace \n\n```\n#set($titleToDisplay = $services.localization.render('attachment.move.title', \n  [$attachment.name, $escapetool.xml($doc.plainTitle), $doc.getURL()]))\n```\n\nby \n\n```\n#set($titleToDisplay = $services.localization.render('attachment.move.title', [\n  $escapetool.xml($attachment.name), \n  $escapetool.xml($doc.plainTitle), \n  $escapetool.xml($doc.getURL())\n]))\n```\n\nSee the corresponding [patch](https://github.com/xwiki/xwiki-platform/commit/fbc4bfbae4f6ce8109addb281de86a03acdb9277).\n\n### References\n\n- https://jira.xwiki.org/browse/XWIKI-19667\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n- Open an issue in [Jira XWiki.org](https://jira.xwiki.org/)\n- Email us at [Security Mailing List](mailto:security@xwiki.org)\n","status":"published","published":"2022-09-16T17:39:08Z","modified":"2023-01-27T05:02:37Z","cvss":[{"version":"3.1","score":8.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","level":"high"}],"cwes":["CWE-79","CWE-80"],"updated_at":"2026-11-02T14:36:19.144959Z"}],"nvd":[{"id":"CVE-2022-36097","description":"XWiki Platform Attachment UI provides a macro to easily upload and select attachments for XWiki Platform, a generic wiki platform. Starting with version 14.0-rc-1 and prior to 14.4-rc-1, it's possible to store JavaScript in an attachment name, which will be executed by anyone trying to move the corresponding attachment. This issue has been patched in XWiki 14.4-rc-1. As a workaround, one may copy `moveStep1.vm` to `webapp/xwiki/templates/moveStep1.vm` and replace vulnerable code with code from the patch.","status":"published","published":"2022-09-08T21:15:08.02Z","modified":"2026-06-17T04:52:54.823Z","cvss":[{"version":"3.1","score":8.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","level":"high","assessor":"secondary"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-79","CWE-80"],"updated_at":"2026-11-02T14:07:27.631109Z"}],"osv":[{"id":"CVE-2022-36097","title":"XWiki Platform Attachment UI vulnerable to cross-site scripting in the move attachment form","description":"XWiki Platform Attachment UI provides a macro to easily upload and select attachments for XWiki Platform, a generic wiki platform. Starting with version 14.0-rc-1 and prior to 14.4-rc-1, it's possible to store JavaScript in an attachment name, which will be executed by anyone trying to move the corresponding attachment. This issue has been patched in XWiki 14.4-rc-1. As a workaround, one may copy `moveStep1.vm` to `webapp/xwiki/templates/moveStep1.vm` and replace vulnerable code with code from the patch.","status":"published","published":"2022-09-08T20:35:11Z","modified":"2026-10-28T10:35:55.047805353Z","cvss":[{"version":"3.1","score":8.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","level":"high"}],"cwes":["CWE-79","CWE-80"],"updated_at":"2026-11-02T15:44:26.195407Z"},{"id":"GHSA-9r9j-57rf-f6vj","title":"XWiki Platform Attachment UI vulnerable to cross-site scripting in the move attachment form","description":"### Impact\n\nIt's possible to store JavaScript in an attachment name, which will be executed by anyone trying to move the corresponding attachment.\n\nFor example, an attachment with name `\u003e\u003cimg src=1 onerror=alert(1)\u003e.jpg` will execute the alert.\n\n### Patches\nThis issue has been patched in XWiki 14.4RC1.\n\n### Workarounds\nIt is possible to fix the vulnerability by copying [moveStep1.vm](https://raw.githubusercontent.com/xwiki/xwiki-platform/xwiki-platform-14.0-rc-1/xwiki-platform-core/xwiki-platform-attachment/xwiki-platform-attachment-api/src/main/resources/templates/attachment/moveStep1.vm) to `webapp/xwiki/templates/moveStep1.vm` and replace \n\n```\n#set($titleToDisplay = $services.localization.render('attachment.move.title', \n  [$attachment.name, $escapetool.xml($doc.plainTitle), $doc.getURL()]))\n```\n\nby \n\n```\n#set($titleToDisplay = $services.localization.render('attachment.move.title', [\n  $escapetool.xml($attachment.name), \n  $escapetool.xml($doc.plainTitle), \n  $escapetool.xml($doc.getURL())\n]))\n```\n\nSee the corresponding [patch](https://github.com/xwiki/xwiki-platform/commit/fbc4bfbae4f6ce8109addb281de86a03acdb9277).\n\n### References\n\n- https://jira.xwiki.org/browse/XWIKI-19667\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n- Open an issue in [Jira XWiki.org](https://jira.xwiki.org/)\n- Email us at [Security Mailing List](mailto:security@xwiki.org)\n","status":"published","published":"2022-09-16T17:39:08Z","modified":"2023-11-08T04:10:00.862468Z","cvss":[{"version":"3.1","score":8.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","level":"high"}],"cwes":["CWE-79","CWE-80"],"updated_at":"2026-11-02T15:46:44.225359Z"}]}}
