VYPR
High severityNVD Advisory· Published Sep 8, 2022· Updated Apr 22, 2025

XWiki Platform Web Parent POM vulnerable to XSS in the attachment history

CVE-2022-36094

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.

PackageAffected versionsPatched versions
org.xwiki.platform:xwiki-platform-webMaven
>= 1.0, < 13.10.613.10.6
org.xwiki.platform:xwiki-platform-webMaven
>= 14.0, < 14.3-rc-114.3-rc-1

Affected products

1

Patches

1
047ce9fa4a7c

XWIKI-19612: XSS in the attachment history

https://github.com/xwiki/xwiki-platformThomas MortagneApr 14, 2022via ghsa
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

News mentions

0

No linked articles in our index yet.