DedeCMS Local File Inclusion (LFI) Vulnerability in carbuyaction.php (CVE-2010-20125)
Executive & SecOps Summary
SECOPS ASSESSMENTAll DedeCMS installations prior to version 5.7
Remote unauthenticated attackers can disclose sensitive local files or system configurations via path traversal sequences
Upgrade to DedeCMS 5.7 or later, or manually patch the uninitialized variable in the affected PHP script
Affected Products & Version Scope
Remediation & Live Workaround Commands
PATCH & WORKAROUND1. Official Patch Upgrade to DedeCMS v5.7 or the latest available version from the official repository.
2. Manual Hotfix If an immediate upgrade is not feasible, modify `plus/carbuyaction.php` to ensure the `$code` variable is properly sanitized and initialized:
// Example fix for plus/carbuyaction.php
$code = preg_replace('/[^a-zA-Z0-9]/', '', $_GET['code'] ?? 'default');
$target_file = DEDEPAY."/payment/{$code}.php";
if (!file_exists($target_file)) {
die("Access Denied");
}3. Network Level Mitigation Deploy WAF rules to intercept and block requests containing directory traversal patterns in the URI or query parameters (e.g., `../`, `..\`, `%2e%2e%2f`).
Block Exploits Instantly with Managed Virtual Patching Rules
Can't patch production immediately? Deploy managed WAF rules at the edge to intercept RCE, SQLi, and deserialization payloads before they hit your origin server.
Technical Root Cause & Exploitation Mechanics
This vulnerability is a classic Local File Inclusion (LFI) residing in plus/carbuyaction.php of DedeCMS. The root cause is the use of an uninitialized $code parameter which is subsequently passed to a require_once statement (CWE-98). An attacker can manipulate this parameter using path traversal sequences like ../../ to bypass the intended directory restrictions. This allows the inclusion and execution (as PHP) or disclosure of arbitrary files on the local file system. Recent threat intelligence from Shadowserver indicates active exploitation attempts as of late 2023, highlighting the continued risk to legacy installations.
Official Vendor Advisories & References
DedeCMS before 5.7 contains a file inclusion vulnerability in plus/carbuyaction.php that allows remote unauthenticated attackers to control the include path by manipulating the uninitialized code parameter passed to require_once. Attackers can supply path traversal sequences ../../ to include arbitrary local files outside the intended payment directory, potentially achieving local file disclosure. Exploitation evidence was first observed by the Shadowserver Foundation on 2023-10-18.
Subscribe to Daily Vulnerability Briefings & KEV Alerts
Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.