CVE-2022-30007

7.2 HIGH

📋 TL;DR

GXCMS V1.5 has a file upload vulnerability in the template management page that allows authenticated attackers to upload malicious PHP files. This can lead to remote code execution and complete server compromise. Only GXCMS V1.5 installations with background/admin access are affected.

💻 Affected Systems

Products:
  • GXCMS
Versions: V1.5
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated access to the background/admin interface. The vulnerability exists in the template management functionality.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server takeover with attacker gaining full control over the web server, data exfiltration, and lateral movement to other systems.

🟠

Likely Case

Webshell deployment leading to data theft, defacement, or use as a foothold for further attacks.

🟢

If Mitigated

Limited impact with proper file upload restrictions and web application firewalls blocking malicious uploads.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires authenticated access to the admin panel. The vulnerability is straightforward to exploit once authenticated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: No

Instructions:

No official patch available. Consider upgrading to a newer version if available or implementing workarounds.

🔧 Temporary Workarounds

Restrict file upload extensions

all

Configure web server to block .php file uploads in template directories

# Apache: Add to .htaccess in template directory
<FilesMatch "\.(php|php5|php7|phtml)$">
    Order Allow,Deny
    Deny from all
</FilesMatch>
# Nginx: Add to server block
location ~* \.(php|php5|php7|phtml)$ {
    deny all;
}

Implement file type validation

all

Add server-side validation to reject PHP file uploads

# Example PHP validation snippet
$allowed_extensions = array('html', 'htm', 'txt', 'css', 'js');
$file_extension = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION);
if (!in_array(strtolower($file_extension), $allowed_extensions)) {
    die('Invalid file type');
}

🧯 If You Can't Patch

  • Restrict admin panel access to trusted IP addresses only
  • Implement web application firewall with file upload protection rules

🔍 How to Verify

Check if Vulnerable:

Check if you can upload a .php file through the template management interface after authenticating to the admin panel.

Check Version:

Check GXCMS version in admin panel or look for version information in source files.

Verify Fix Applied:

Attempt to upload a .php file through the template management interface - it should be rejected.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file uploads to template directories
  • .php files appearing in template folders
  • Multiple failed upload attempts

Network Indicators:

  • POST requests to template upload endpoints with PHP file extensions
  • Unusual outbound connections from web server

SIEM Query:

source="web_server_logs" AND (uri="*template*" AND method="POST" AND file_extension="php")

🔗 References

📤 Share & Export