CVE-2024-44818
Executive Summary
CVE-2024-44818 is a reflected Cross-Site Scripting (XSS) vulnerability in ZZCMS versions 2023 and earlier. The flaw resides in the caina.php component, where the HTTP_Referer header is improperly sanitized before being reflected in the application’s response. An attacker can craft a malicious link that, when clicked by an authenticated or unauthenticated user, executes arbitrary JavaScript in the context of the victim’s browser session. This can lead to session hijacking, credential theft, or defacement. No official patch has been released by the vendor, and no public exploit code or Nuclei template is available at this time.
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
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- Base Score: 5.4 (Medium)
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required (victim must click a crafted link)
- Scope: Unchanged
- Confidentiality Impact: Low (potential cookie theft)
- Integrity Impact: Low (potential content injection)
- Availability Impact: None
Threat Level: Medium. The vulnerability requires user interaction but can be exploited without authentication, making it a viable vector for phishing campaigns.
Deep Dive & Mechanics
The vulnerability exists in the caina.php script, which processes the HTTP_Referer header. When a request is made to this endpoint, the application echoes the Referer value directly into the HTML response without proper encoding or sanitization. An attacker can craft a URL that, when visited, sets a malicious Referer header (e.g., via a <meta> refresh or a link with a javascript: URI). The injected payload executes in the victim’s browser, allowing the attacker to steal cookies, perform actions on behalf of the user, or redirect to phishing pages.
Root Cause: Lack of output encoding for user-controllable input (the Referer header) in the response.
Vulnerable vs. Patched Code
Vulnerable Code (zzcms/caina.php):
<?php
$referer = $_SERVER['HTTP_REFERER'];
echo "Referer: " . $referer;
?>
Patched Code (hypothetical):
<?php
$referer = $_SERVER['HTTP_REFERER'];
echo "Referer: " . htmlspecialchars($referer, ENT_QUOTES, 'UTF-8');
?>
The patched version uses htmlspecialchars() to encode special HTML characters, preventing script injection.
Exploitation & Lab Setup
Red Team
Proof-of-Concept (PoC):
- Host a malicious page that sets a crafted
Refererheader:<html> <body> <a href="http://target-zzcms/caina.php" referrerpolicy="unsafe-url">Click me</a> <script> // Alternative: use meta refresh // <meta http-equiv="refresh" content="0;url=http://target-zzcms/caina.php"> </script> </body> </html> - Alternatively, use a direct link with a
javascript:URI:
Set thehttp://target-zzcms/caina.phpRefererheader via a custom HTTP client:curl -H "Referer: <script>alert('XSS')</script>" http://target-zzcms/caina.php
Exploit-DB Code: None available.
Blue Team
Detection Steps:
- Monitor web server logs for unusual
Refererheaders containing<script>,onerror=, or other JavaScript event handlers. - Deploy a Web Application Firewall (WAF) rule to block requests with suspicious
Referervalues. - Conduct regular code reviews to ensure all user input is properly sanitized.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests to
/caina.phpwithRefererheaders containing<script>,%3Cscript%3E, or other encoded script tags. - Outbound connections from the victim’s browser to attacker-controlled domains (e.g., for cookie exfiltration).
- HTTP requests to
- File IOCs:
- Modified
caina.phpfile (if attacker gains write access). - Suspicious entries in web server access logs (e.g.,
"Referer: <script>...").
- Modified
Detection Engineering
YARA Rule
rule CVE_2024_44818_XSS_Referer {
meta:
description = "Detects XSS payloads in HTTP Referer header targeting ZZCMS caina.php"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2024-44818"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$event_handler = /on\w+\s*=\s*['"][^'"]*['"]/i
$encoded_script = /%3Cscript%3E|%3C\/script%3E/i
condition:
any of them
}
Sigma Rule
title: Suspicious Referer Header in ZZCMS Request
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects XSS attempts via Referer header in ZZCMS caina.php
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-uri-stem: '/caina.php'
cs(Referer): '*<script>*'
condition: selection
falsepositives:
- Legitimate use of script tags in Referer (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-44818 ZZCMS XSS via Referer Header"; flow:to_server; content:"/caina.php"; http_uri; content:"Referer|3a|"; http_header; pcre:"/<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Apply input validation and output encoding to the
Refererheader incaina.php. Usehtmlspecialchars()or equivalent. - WAF Rule: Block requests containing
<script>oronerror=in theRefererheader. - User Education: Train users to avoid clicking suspicious links, especially those that redirect to ZZCMS.
- Vendor Contact: Reach out to ZZCMS maintainers for an official patch. If none is forthcoming, consider migrating to a supported CMS.
- Monitoring: Enable detailed logging for
/caina.phpand alert on anomalousReferervalues.
Valters IT
Securing Digital Frontiers
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.