{"id":"CVE-2022-36097","aliases":["CVE-2022-36097","GHSA-9r9j-57rf-f6vj"],"related":[],"kind":"vulnerability","state":"published","title":"XWiki Platform Attachment UI vulnerable to cross-site scripting in the move attachment form","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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 `><img src=1 onerror=alert(1)>.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)","format":"markdown","source":"ghsa"},{"lang":"es","text":"XWiki Platform Attachment UI proporciona una macro para cargar y seleccionar archivos adjuntos fácilmente para la plataforma XWiki, una plataforma wiki genérica.&#xa0;A partir de la versión 14.0-rc-1 y anteriores a 14.4-rc-1, es posible almacenar JavaScript en un nombre de archivo adjunto, que será ejecutado por cualquiera que intente mover el archivo adjunto correspondiente.&#xa0;Este problema ha sido parcheado en XWiki versión 14.4-rc-1.&#xa0;Como mitigación, puede copiarse \"moveStep1.vm\" en \"webapp/xwiki/templates/moveStep1.vm\" y reemplazar el código vulnerable con el código del parche","source":"nvd"}],"published":"2022-09-08T20:35:11.000Z","modified":"2026-06-17T04:52:54.823Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","score":8.9,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","score":8.9,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","score":8.9,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79","CWE-80"],"affected":[{"ranges":[{"version":">= 14.0-rc-1, < 14.4-rc-1","status":"affected"}],"vendor":"xwiki","product":"xwiki-platform","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"14.0-rc-1","status":"affected","fixed":"14.4-rc-1"}],"ecosystem":"Maven","package":"org.xwiki.platform:xwiki-platform-attachment-ui","purl":"pkg:maven/org.xwiki.platform/xwiki-platform-attachment-ui","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"14.0","fixed":"14.3"}],"vendor":"xwiki","product":"xwiki","cpe":"cpe:2.3:a:xwiki:xwiki:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-9r9j-57rf-f6vj","tags":["exploit","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/xwiki/xwiki-platform/commit/fbc4bfbae4f6ce8109addb281de86a03acdb9277","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://jira.xwiki.org/browse/XWIKI-19667","tags":["exploit","vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"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":["exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-36097","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/xwiki/xwiki-platform","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2025-04-22T15:41:56.131Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-36097","url":"https://www.cve.org/CVERecord?id=CVE-2022-36097","licence":"CVE Terms of Use","modified":"2025-04-22T17:22:54.187Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9r9j-57rf-f6vj","url":"https://github.com/advisories/GHSA-9r9j-57rf-f6vj","licence":"CC-BY-4.0","modified":"2023-11-08T04:10:00.862Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-36097","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-36097","licence":"Public domain","modified":"2026-06-17T04:52:54.823Z"}],"updatedAt":"2026-11-25T22:58:14.781Z","epss":{"score":0.59106,"percentile":0.99129,"date":"2026-12-01T12:00:22.000Z"}}