Skip to content

Before GetSimpleCMS 3.3.16 version upload.php allowed to upload executable files lead to RCE #1335

@Cyc1e183

Description

@Cyc1e183

Affected version: GetSimpleCMS before 3.3.16.

Vulnerable file: /admin/upload.php.

Causes of vulnerability : upload.php does not allow direct uploading of ph* type files, and it fails when directly uploading ph* files.
image-20210319202759593
However, you can bypass the detection by uploading a phar file and adding picture file header information such as jpg to the file to successfully upload the phar file.
image-20210319202821966
Because the phar file can be parsed normally after php7.2, you can directly upload the php webshell with the phar suffix.
image-20210319204401342

Repair suggestion: add the ph* file to the upload blacklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions