Skip to content

Malicious File Upload Vulnerability #269

Description

@hacip

UploadController.cs file does not have any security control if the Editor chose to upload a video.

Between Line 101 and 110 on UploadController.cs, it gets a file submitted via HTTP request (Line 20), sets a hard-coded destination for the upload (Custom/Media), and calls the UploadVideo function which is in the same file.

The UploadVideo function does only check if the target directory exists or not, but it does not check the file.

Therefore, it is possible to upload a malicious file that can run commands on the app server.

To mitigate, file type should be checked using a white-list approach, if the type of the fille is not known by the application, the upload function should return an error.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions