CVE-2022-36097 XWiki Platform Attachment UI vulnerable to cross-site scripting in the move attachment form
Attackers can inject JavaScript via attachment names, leading to script execution when users attempt to move attachments in XWiki.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2022-36097?
CVE-2022-36097 is a high-severity cross-site scripting vulnerability in Xwiki Xwiki, published on 8 Sep 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official 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.
Which versions are affected by CVE-2022-36097?
2 open source packages ship an affected version, including org.xwiki.platform:xwiki-platform-attachment-ui. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.xwiki.platform:xwiki-platform-attachment-ui Maven | From 14.0-rc-1 | 14.4-rc-1 |
org.xwiki.platform:xwiki-platform-attachment-ui Maven | From 14.0-rc-1 | 14.4-rc-1 |
Products include Xwiki Xwiki.
How do I fix CVE-2022-36097?
Upgrade org.xwiki.platform:xwiki-platform-attachment-ui to 14.4-rc-1 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2022-36097 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-36097 exists.
Other vulnerabilities in Xwiki Xwiki
- CVE-2025-24893 XWiki Platform Eval Injection
- CVE-2025-53836 XWiki Rendering is vulnerable to RCE attacks when processing nested macros
- CVE-2024-55662 XWiki allows remote code execution through the extension sheet
- CVE-2024-55877 XWiki allows remote code execution from account through macro descriptions and XWiki.XWikiSyntaxMacrosList
- CVE-2024-37901 XWiki Platform vulnerable to remote code execution from account via SearchSuggestConfigSheet
Sources
Also known as GHSA-9r9j-57rf-f6vj.