XWiki Platform Web Parent POM vulnerable to XSS in the attachment history
Description
XWiki Platform Web Parent POM contains Web resources for the XWiki platform, a generic wiki platform. Starting with version 1.0 and prior to versions 13.10.6 and 14.30-rc-1, it's possible to store JavaScript which will be executed by anyone viewing the history of an attachment containing javascript in its name. This issue has been patched in XWiki 13.10.6 and 14.3RC1. As a workaround, it is possible to replace viewattachrev.vm, the entry point for this attack, by a patched version from the patch without updating XWiki.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
org.xwiki.platform:xwiki-platform-webMaven | >= 1.0, < 13.10.6 | 13.10.6 |
org.xwiki.platform:xwiki-platform-webMaven | >= 14.0, < 14.3-rc-1 | 14.3-rc-1 |
Affected products
1- Range: >= 1.0, < 13.10.6
Patches
1047ce9fa4a7cXWIKI-19612: XSS in the attachment history
1 file changed · +2 −2
xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/viewattachrev.vm+2 −2 modified@@ -20,7 +20,7 @@ #template("startpage.vm") <div class="main layoutsubsection"> <div id="mainContentArea"> -<h3>$services.localization.render("core.viewers.attachments.revisions", [$attachment.filename])</h3> +<h3>$services.localization.render("core.viewers.attachments.revisions", [$escapetool.xml($attachment.filename)])</h3> #if ("$tdoc.realLocale" != '') #set($lang = "&language=${tdoc.realLocale}") #else @@ -40,7 +40,7 @@ #set($url = $doc.getAttachmentRevisionURL("${attachment.filename}", ${version.toString()})) #end #if ($attachment.isImage()) - <td><img src="${url}" alt="${attachment.filename}" width="80" /> + <td><img src="${url}" alt="${escapetool.xml($attachment.filename)}" width="80" /> #else <td class="mime">#mimetypeimg($attachment.getMimeType().toLowerCase() $attachment.getFilename().toLowerCase()) #end
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- github.com/advisories/GHSA-mxf2-4r22-5hq9ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-36094ghsaADVISORY
- github.com/xwiki/xwiki-platform/commit/047ce9fa4a7c13f3883438aaf54fc50f287a7e8eghsax_refsource_MISCWEB
- github.com/xwiki/xwiki-platform/security/advisories/GHSA-mxf2-4r22-5hq9ghsax_refsource_CONFIRMWEB
- jira.xwiki.org/browse/XWIKI-19612ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.