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

There is a file upload vulnerability that can execute arbitrary code #10

Open
Aview17 opened this issue Oct 21, 2020 · 0 comments
Open

Comments

@Aview17
Copy link

Aview17 commented Oct 21, 2020

In hisiphpv2.0.11, after the administrator logs in, the installation package (.zip file) can be uploaded at the system -> local plug-in -> import plug-in

image

The code for uploading the logic is located in the import() function of the "app\system\admin\Plugins" class, where the zip file is extracted before being safely processed.

Special packets can be constructed in
$files = Dir::getList($decompath. '/ Upload/Plugins /');
Throws an exception to bypass the security check

Package shell.php as a zip file (make sure there are no/Upload /plugins/ under the path)

Poc as follows

image

The response contains the path

image

You can see that shell.php is uploaded

image

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

1 participant