CVE-2019-16885
📋 TL;DR
CVE-2019-16885 is an unauthenticated remote code execution vulnerability in OkayCMS that allows attackers to execute arbitrary PHP code by injecting malicious objects via crafted cookies. This affects all OkayCMS installations through version 2.3.4. Attackers can exploit this without any authentication to gain full control of affected systems.
💻 Affected Systems
- OkayCMS
📦 What is this software?
Okaycms by Okay Cms
⚠️ Risk & Real-World Impact
Worst Case
Complete system compromise allowing attackers to execute arbitrary commands, steal data, install malware, pivot to other systems, and maintain persistent access.
Likely Case
Remote code execution leading to website defacement, data theft, cryptocurrency mining, or ransomware deployment.
If Mitigated
Limited impact with proper network segmentation, but still potential for initial foothold in the affected system.
🎯 Exploit Status
Multiple public exploit scripts and detailed write-ups available. Exploitation requires sending crafted cookies to specific endpoints.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.3.5 or later
Vendor Advisory: https://okay-cms.com/
Restart Required: No
Instructions:
1. Backup your OkayCMS installation and database. 2. Download the latest version from the official OkayCMS website. 3. Replace all files with the patched version. 4. Verify the update was successful by checking the version.
🔧 Temporary Workarounds
Cookie Input Validation
allAdd input validation for price_filter and comparison cookies to reject PHP object serialization
Modify view/ProductsView.php and api/Comparison.php to validate cookie inputs
Web Application Firewall Rules
allBlock requests containing PHP object serialization patterns in cookies
Add WAF rules to detect and block base64 encoded serialized objects in cookies
🧯 If You Can't Patch
- Implement strict network segmentation to isolate OkayCMS from critical systems
- Deploy a web application firewall with rules to block exploitation attempts
🔍 How to Verify
Check if Vulnerable:
Check if your OkayCMS version is 2.3.4 or earlier. Review access logs for requests to /view/ProductsView.php or /api/Comparison.php with suspicious cookies.
Check Version:
Check the version in the admin panel or examine the CMS configuration files
Verify Fix Applied:
Verify the version is 2.3.5 or later. Test that cookie injection no longer results in code execution.
📡 Detection & Monitoring
Log Indicators:
- HTTP requests to /view/ProductsView.php or /api/Comparison.php with base64 encoded data in price_filter or comparison cookies
- Unusual PHP process execution from web server context
Network Indicators:
- HTTP POST/GET requests with serialized PHP objects in cookies
- Outbound connections from web server to suspicious IPs
SIEM Query:
source="web_logs" AND (uri="/view/ProductsView.php" OR uri="/api/Comparison.php") AND cookie CONTAINS "O:"
🔗 References
- http://packetstormsecurity.com/files/155583/OkayCMS-2.3.4-Remote-Code-Execution.html
- http://seclists.org/fulldisclosure/2019/Dec/15
- https://www.ait.ac.at/ait-sa-20191129-01-unauthenticated-remote-code-execution-okaycms
- http://packetstormsecurity.com/files/155583/OkayCMS-2.3.4-Remote-Code-Execution.html
- http://seclists.org/fulldisclosure/2019/Dec/15
- https://www.ait.ac.at/ait-sa-20191129-01-unauthenticated-remote-code-execution-okaycms