VYPR
Critical severityNVD Advisory· Published Jun 23, 2023· Updated Nov 27, 2024

XWiki Platform vulnerable to reflected cross-site scripting via xredirect parameter in restore template

CVE-2023-35158

Description

XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Users are able to forge an URL with a payload allowing to inject Javascript in the page (XSS). It's possible to exploit the restore template to perform a XSS, e.g. by using URL such as: > /xwiki/bin/view/XWiki/Main?xpage=restore&showBatch=true&xredirect=javascript:alert(document.domain). This vulnerability exists since XWiki 9.4-rc-1. The vulnerability has been patched in XWiki 14.10.5 and 15.1-rc-1.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
org.xwiki.platform:xwiki-platform-flamingo-skin-resourcesMaven
>= 9.4-rc-1, < 14.10.514.10.5
org.xwiki.platform:xwiki-platform-flamingo-skin-resourcesMaven
>= 15.0-rc-1, < 15.1-rc-115.1-rc-1

Affected products

1

Patches

1
d5472100606c

XWIKI-20352: Sanitize template URLs

https://github.com/xwiki/xwiki-platformSimon UrliFeb 2, 2023via ghsa
1 file changed · +3 3
  • xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/restore.vm+3 3 modified
    @@ -178,9 +178,9 @@
       </div>
       <button class="btn btn-primary">$services.localization.render('core.restore.confirm.yes')</button>
       #if("$!{request.xredirect}" != '')
    -    #set($cancelUrl = "$request.xredirect")
    +    #getSanitizedURLAttributeValue('a','href',$request.xredirect,$doc.getURL(),$cancelUrl)
       #else
    -    #set($cancelUrl = $doc.getURL())
    +    #set($cancelUrl = $escapetool.xml($doc.getURL()))
       #end
    -  <a class="btn btn-default" href="$!{escapetool.xml(${cancelUrl})}">$services.localization.render('core.restore.confirm.no')</a>
    +  <a class="btn btn-default" href="$cancelUrl">$services.localization.render('core.restore.confirm.no')</a>
     #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

6

News mentions

0

No linked articles in our index yet.