elunez / eladmin

eladmin jpa 版本:项目基于 Spring Boot 2.6.4、 Jpa、 Spring Security、Redis、Vue的前后端分离的后台管理系统,项目采用分模块开发方式, 权限控制采用 RBAC,支持数据字典与数据权限管理,支持一键生成前后端代码,支持动态路由
https://eladmin.vip/demo
Apache License 2.0
21.07k stars 7.33k forks source link

There has a directory traversal vulnerability. #791

Closed qytxhjb closed 1 year ago

qytxhjb commented 1 year ago

https://github.com/elunez/eladmin/blob/f3cdf8ccfced849f902f58ac95c8b0bb48d68cb4/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployController.java#L108

The name of the uploaded file is not verified here. Users can construct a cross-directory file name to delete and replace other important files on the server.Do as follows:

1、Use fiddler excute a request, my upload folder is D:/data/test , create a file 123.txt in D:/ , but filename set " /../123.txt " a b

2、we can see the file d:/123.txt has bean deleted c

elunez commented 1 year ago

Fixed