CVE-2022-25046

9.8 CRITICAL

📋 TL;DR

CVE-2022-25046 is a critical path traversal vulnerability in CentOS Web Panel (CWP) that allows unauthenticated attackers to execute arbitrary code on affected servers. Attackers can exploit this by sending a specially crafted POST request to loader.php, potentially gaining full control of the system. This affects all administrators running vulnerable versions of CWP.

💻 Affected Systems

Products:
  • CentOS Web Panel (CWP)
Versions: v0.9.8.1122 and earlier
Operating Systems: CentOS, RHEL, Other Linux distributions running CWP
Default Config Vulnerable: ⚠️ Yes
Notes: All default installations of affected CWP versions are vulnerable. The vulnerability is in the core loader.php file.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise with root-level access, data theft, ransomware deployment, and persistent backdoor installation.

🟠

Likely Case

Remote code execution leading to web server compromise, data exfiltration, and lateral movement within the network.

🟢

If Mitigated

Limited impact with proper network segmentation, WAF rules blocking path traversal patterns, and restricted file permissions.

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable without authentication on internet-facing CWP installations.
🏢 Internal Only: MEDIUM - Internal systems are still vulnerable but require network access; risk depends on internal segmentation.

🎯 Exploit Status

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

Multiple proof-of-concept exploits are publicly available. The vulnerability requires minimal technical skill to exploit.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v0.9.8.1123 and later

Vendor Advisory: https://github.com/Immersive-Labs-Sec/CentOS-WebPanel

Restart Required: No

Instructions:

1. Log into CWP admin panel. 2. Navigate to Updates section. 3. Apply available updates to upgrade to v0.9.8.1123 or later. 4. Verify the update completed successfully.

🔧 Temporary Workarounds

Restrict access to loader.php

linux

Block direct access to the vulnerable loader.php file using web server configuration.

# For Apache: add to .htaccess or virtual host config
<Files "loader.php">
    Order Deny,Allow
    Deny from all
</Files>
# For Nginx: add to server block
location ~ /loader\.php$ {
    deny all;
    return 403;
}

Implement WAF rules

linux

Add web application firewall rules to block path traversal patterns in POST requests.

# ModSecurity rule example
SecRule ARGS "\.\./" "id:1001,phase:2,deny,msg:'Path Traversal Attempt'"

🧯 If You Can't Patch

  • Immediately restrict network access to CWP admin interface using firewall rules (iptables/nftables) to only allow trusted IPs.
  • Monitor system logs for any POST requests to loader.php with suspicious parameters and implement file integrity monitoring on critical system files.

🔍 How to Verify

Check if Vulnerable:

Check CWP version via admin panel or run: grep 'CWP_VERSION' /usr/local/cwpsrv/htdocs/resources/admin/include/version.php

Check Version:

grep 'CWP_VERSION' /usr/local/cwpsrv/htdocs/resources/admin/include/version.php

Verify Fix Applied:

Confirm version is v0.9.8.1123 or later and test that loader.php no longer accepts malicious POST requests with path traversal payloads.

📡 Detection & Monitoring

Log Indicators:

  • POST requests to /loader.php with ../ patterns in parameters
  • Unusual file creation in system directories
  • Suspicious process execution from web server user

Network Indicators:

  • Unusual outbound connections from web server to external IPs
  • POST requests with encoded path traversal sequences

SIEM Query:

source="web_logs" AND url="/loader.php" AND (method="POST" AND (param CONTAINS "../" OR param CONTAINS "..\\"))

🔗 References

📤 Share & Export