This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-315bd5e4-8cca-4852-96f4-bb7ad469a609 XWIKI-23755 Open

Stored XSS via package filename in Administration Import section

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-4e05ae9a-a0e1-44f9-9353-6339310c6a99 Łukasz Rybak created this issue on 25/Nov/25 01:30
 
Summary: Stored XSS via package filename in Administration Import section
Issue Type: cid:jira-generated-image-avatar-315bd5e4-8cca-4852-96f4-bb7ad469a609 Bug
Assignee: Unassigned
Attachments: Stored_XSS_import.png
Created: 25/Nov/25 01:30
Priority: cid:jira-generated-image-static-major-feeb0fca-7f46-4f72-bf0c-4a20b600ae28 Major
Reporter: Łukasz Rybak
Description:

Impact

The Import section in Global Administration (/bin/admin/XWiki/XWikiPreferences?section=Import) is vulnerable to Stored Cross-Site Scripting (XSS). The application fails to properly sanitize the filenames of uploaded packages before displaying them in the "Available packages" list.

This allows an attacker to upload a maliciously named file which will execute arbitrary JavaScript code in the browser of any user viewing the Import page. Since this page is within the Administration area, this typically leads to privilege escalation or full compromise of the administrator's session.

Proof of Concept

  1. Create a dummy file or rename an existing .xar package to include an XSS payload in its name. Payload used: ><img src=x onerror=prompt('XSS')>.xar
  1. Log in to XWiki as an administrator (or a user with upload rights).
  1. Navigate to Administer Wiki -> Content -> Import.
  1. Upload the malicious file.
  1. Observe that immediately after upload (and on subsequent visits), the JavaScript payload executes.

Evidence: The attached screenshot shows the prompt('XSS') alert executing on the xwiki domain within the Import administration panel, triggered by the file listed in "Available packages".

Patches

The application should properly escape HTML special characters (entity encoding) when rendering filenames in the UI.

Attribution

Reported by: Łukasz Rybak GitHub: https://github.com/lukasz-rybak