Listen to this Post
FoxCMS v1.2.5 contains an arbitrary file deletion vulnerability in the `delRestoreSerie` method due to insufficient input validation. Attackers can exploit this by crafting a malicious request with a manipulated file path parameter, allowing them to delete arbitrary files on the server. This occurs because the method does not sanitize user-supplied input before passing it to filesystem operations. Successful exploitation leads to denial-of-service (DoS), data loss, or even remote code execution if critical system files are deleted. The vulnerability has a CVSS 4.0 score of 9.8 (Critical), with low attack complexity and no privileges required.
DailyCVE Form:
Platform: FoxCMS
Version: 1.2.5
Vulnerability: Arbitrary File Deletion
Severity: Critical
Date: 06/12/2025
Prediction: Patch by 07/20/2025
What Undercode Say:
Analytics:
- Exploitable via HTTP requests.
- Affects default configurations.
- No authentication required.
Exploit Command:
curl -X POST http://target.com/api/delRestoreSerie -d "file=../../../../etc/passwd"
Mitigation Steps:
1. Restrict file deletion to safe directories.
2. Implement input validation:
function sanitizePath($path) { return str_replace('../', '', $path); }
3. Apply least-privilege permissions.
Detection Script:
import requests response = requests.post("http://target.com/api/delRestoreSerie", data={"file": "test.txt"}) if response.status_code == 200 and "File deleted" in response.text: print("Vulnerable to CVE-2025-45238")
Patch Analysis:
- Vendor update expected to include path normalization.
- Temporary fix: Disable `delRestoreSerie` method.
Log Monitoring:
grep "delRestoreSerie" /var/log/foxcms/access.log | grep -E "../"
Impact Assessment:
- High risk for data integrity.
- Exploitable in shared hosting.
Workaround:
location /api/delRestoreSerie { deny all; }
Exploit Prevention:
- Use Web Application Firewall (WAF) rules.
- Audit file operations.
Vulnerable Code Snippet:
function delRestoreSerie($file) { unlink($file); // No validation }
Secure Code Fix:
function delRestoreSerie($file) { $baseDir = "/safe/dir/"; $realPath = realpath($baseDir . $file); if (strpos($realPath, $baseDir) === 0) { unlink($realPath); } }
Sources:
Reported By: nvd.nist.gov
Extra Source Hub:
Undercode