dromara / dromara/ujcms

The ZIP upload feature of UJCMS_v9.7.5 has a stored XSS vulnerability.

Open
#12 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
665
Forks
114
PR merge metrics
No merged PRs in 30d

Description

【Vulnerability Description】
There is a vulnerability in the ZIP upload function of the ujcms_v9.7.5 backend. The content of HTML and PDF files in the uploaded ZIP compressed package is not filtered or checked. When users view maliciously crafted HTML or PDF files, the embedded malicious JavaScript code will be triggered, which may lead to the theft of sensitive tokens.

【Vulnerability Type】
CWE-79: Cross-site Scripting

【Product Vendor】
https://gitee.com/ujcms/ujcms
https://github.com/ujcms/ujcms
https://www.ujcms.com/

【Affected Product Code Repository】
ujcms_v9.7.5

【Vulnerability Proof】
Upload a ZIP compressed package containing HTML and PDF files with XSS payload
Clicking on "View" will trigger the XSS payload

![Image](https://github.com/user-attachments/assets/43999307-5142-4e59-b2af-12aaf1538d9d)

![Image](https://github.com/user-attachments/assets/af4fda09-cbdc-4fc9-9261-ffa8825dfcc9)

![Image](https://github.com/user-attachments/assets/6451f456-e8c7-4bdb-bc3f-78e08c470384)

![Image](https://github.com/user-attachments/assets/415e10c7-59d9-4f08-a341-9a2ce161cb89)

【Code Location】
/main/java/com/ujcms/cms/ext/web/backendapi/WebFileUploadController.java#uploadZip

【Code Analysis】
No check is performed on the content of files in the ZIP compressed package

![Image](https://github.com/user-attachments/assets/53837540-11c8-46ef-8972-d47e1d021465)

![Image](https://github.com/user-attachments/assets/f821521c-ebc7-40f4-a3ee-ca3a3fdbc99b)

【Repair Suggestions】
Check the content of files in the compressed package

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.