CVE-2018-16771

9.8 CRITICAL

📋 TL;DR

CVE-2018-16771 is a critical remote code execution vulnerability in Hoosk CMS v1.7.0 that allows attackers to execute arbitrary PHP code by manipulating the SiteUrl parameter during installation. This affects all Hoosk installations using the vulnerable version, potentially giving attackers complete control over affected systems.

💻 Affected Systems

Products:
  • Hoosk CMS
Versions: v1.7.0
Operating Systems: All platforms running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations where the attacker can control the SiteUrl parameter during installation or modify config.php directly.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise allowing attackers to execute arbitrary commands, steal data, install backdoors, pivot to other systems, and maintain persistent access.

🟠

Likely Case

Web server compromise leading to data theft, defacement, or use as part of a botnet for further attacks.

🟢

If Mitigated

Limited impact if proper network segmentation and web application firewalls are in place, though the vulnerability remains exploitable.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires access to the installation process or ability to modify config.php. Public proof-of-concept exists in GitHub issues.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v1.8.0 or later

Vendor Advisory: https://github.com/havok89/Hoosk/issues/46

Restart Required: No

Instructions:

1. Backup your current installation and database. 2. Download Hoosk v1.8.0 or later from the official repository. 3. Replace all files except config.php and uploads directory. 4. Verify the installation works correctly.

🔧 Temporary Workarounds

Secure config.php permissions

linux

Restrict write access to config.php to prevent modification

chmod 644 config.php
chown www-data:www-data config.php

Web Application Firewall rule

all

Block requests attempting to modify or access config.php with malicious parameters

🧯 If You Can't Patch

  • Remove write permissions from config.php after installation
  • Implement strict input validation and sanitization for all user-controlled parameters

🔍 How to Verify

Check if Vulnerable:

Check if running Hoosk v1.7.0 by examining the version in admin panel or checking composer.json

Check Version:

grep -i 'version' composer.json || cat config.php | grep -i 'hoosk'

Verify Fix Applied:

Verify version is 1.8.0 or higher and config.php contains proper input validation

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to installation scripts
  • Modifications to config.php file
  • PHP execution errors with eval() or system() calls

Network Indicators:

  • HTTP requests with PHP code in SiteUrl parameter
  • Traffic to known malicious IPs from web server

SIEM Query:

source="web_logs" AND (uri="*/install*" AND (param="SiteUrl" AND value MATCHES "php://" OR "system(" OR "eval(")) OR file="config.php" AND action="modify")

🔗 References

📤 Share & Export