CVE-2022-36097 XWiki Platform Attachment UI vulnerable to cross-site scripting in the move attachment form

High 8.9 Published Updated

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.

Weakness: CWE-80, CWE-79

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.

PackageAffectedFixed in
org.xwiki.platform:xwiki-platform-attachment-ui MavenFrom 14.0-rc-114.4-rc-1
org.xwiki.platform:xwiki-platform-attachment-ui MavenFrom 14.0-rc-114.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.

All Xwiki Xwiki vulnerabilities

Sources

Also known as GHSA-9r9j-57rf-f6vj.

Is CVE-2022-36097 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free