Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ujcms v6.0.2 has a sensitive file reading problem #6

Closed
keecth opened this issue Jun 6, 2023 · 1 comment
Closed

Ujcms v6.0.2 has a sensitive file reading problem #6

keecth opened this issue Jun 6, 2023 · 1 comment

Comments

@keecth
Copy link

keecth commented Jun 6, 2023

[Vulnerability description]

Ujcms v6.0.2 has a sensitive file reading problem. When using Tomcat to deploy the project, the background zip package downloads the html directory, and modifying the dir parameter causes the source code and configuration files to be downloaded

[Vulnerability Type]
Sensitive file reading(Information Disclosure)

[Vendor of Product]
https://gitee.com/ujcms/ujcms
https://github.com/ujcms/ujcms
https://www.ujcms.com/

[Affected Product Code Base]
v6.0.2

[Vulnerability proof]

Condition: tomcat deployment project

The dir parameter is allowed to be set to "WEB-INF/", and the names parameter is allowed to be set to "classes", so that the source code and web configuration files can be downloaded directly.(There is no html directory by default, you can create it directly through the function)

image-20230606124209259

image-20230606125908489

image-20230606130027003

[Code Details]

com.ujcms.cms.core.web.backendapi.AbstractWebFileController#downloadZip
The code checks the two parameters "dir" and "names" separately

image-20230606130152382

com.ujcms.cms.core.web.backendapi.AbstractWebFileController#checkId(java.lang.String)
Check whether there is directory traversal, no restrictions on accessible directories

image-20230606130208683

com.ujcms.cms.core.web.backendapi.AbstractWebFileController#checkName(java.lang.String)Check the file name, when both meet
(1) The file name is empty
(2) The file name contains illegal characters
Accessible directories are not restricted

image-20230606130903428

@ujcms
Copy link
Owner

ujcms commented Jun 9, 2023

Fixed in version 7.0.0

@ujcms ujcms closed this as completed Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants