CVE-2018-18083
📋 TL;DR
This vulnerability allows remote attackers to execute arbitrary PHP code on DuomiCMS 3.0 systems by exploiting improper input validation in the search.php file. The 'searchword' parameter is passed to an 'eval' function during 'if' processing, enabling code injection. Any organization running DuomiCMS 3.0 is affected.
💻 Affected Systems
- DuomiCMS
📦 What is this software?
Duomicms by Comsenz
⚠️ Risk & Real-World Impact
Worst Case
Complete system compromise allowing attackers to execute arbitrary commands, steal data, install backdoors, pivot to other systems, or deploy ransomware.
Likely Case
Remote code execution leading to website defacement, data theft, or installation of cryptocurrency miners or botnet clients.
If Mitigated
Limited impact with proper input validation, WAF protection, and restricted PHP execution environments.
🎯 Exploit Status
Exploitation is straightforward with publicly available proof-of-concept code. Attackers can craft malicious searchword parameters to execute arbitrary PHP code.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: No official vendor advisory found
Restart Required: No
Instructions:
1. Check for official patches from DuomiCMS developers
2. If no patch available, implement workarounds or migrate to alternative CMS
3. Monitor for security updates
🔧 Temporary Workarounds
Input Validation Filter
allAdd input validation to sanitize the searchword parameter before processing
Modify search.php to add: $searchword = preg_replace('/[^a-zA-Z0-9\s]/', '', $_POST['searchword']);
Disable Eval Function
allDisable the eval() function in PHP configuration if not required
Add to php.ini: disable_functions = eval
🧯 If You Can't Patch
- Implement a Web Application Firewall (WAF) with rules to block eval() function calls and suspicious PHP code patterns
- Restrict access to search.php using IP whitelisting or authentication requirements
🔍 How to Verify
Check if Vulnerable:
Test by sending a crafted searchword parameter with PHP code (e.g., searchword=phpinfo()) to search.php and checking if code executes
Check Version:
Check DuomiCMS version in admin panel or configuration files
Verify Fix Applied:
Test the same payload after applying fixes to ensure code execution is prevented
📡 Detection & Monitoring
Log Indicators:
- Unusual POST requests to search.php with PHP code in parameters
- Multiple failed eval() executions
- Suspicious PHP function calls in web logs
Network Indicators:
- HTTP requests containing 'eval(' or 'system(' in searchword parameter
- Unusual outbound connections from web server
SIEM Query:
source="web_logs" AND uri="*/search.php" AND (searchword="*eval*" OR searchword="*system*" OR searchword="*phpinfo*")
🔗 References
- https://github.com/Mochazz/Mochazz.github.io/blob/master/2018/09/30/DuomiCms3.0%E6%9C%80%E6%96%B0%E7%89%88%E6%BC%8F%E6%B4%9E%E6%8C%96%E6%8E%98/index.html
- https://mochazz.github.io/2018/09/30/DuomiCms3.0%E6%9C%80%E6%96%B0%E7%89%88%E6%BC%8F%E6%B4%9E%E6%8C%96%E6%8E%98/
- https://github.com/Mochazz/Mochazz.github.io/blob/master/2018/09/30/DuomiCms3.0%E6%9C%80%E6%96%B0%E7%89%88%E6%BC%8F%E6%B4%9E%E6%8C%96%E6%8E%98/index.html
- https://mochazz.github.io/2018/09/30/DuomiCms3.0%E6%9C%80%E6%96%B0%E7%89%88%E6%BC%8F%E6%B4%9E%E6%8C%96%E6%8E%98/