CVE-2022-30037

7.2 HIGH

📋 TL;DR

XunRuiCMS versions 4.3.3 to 4.5.1 contain a vulnerability in the cron.php add function that allows authenticated attackers to write arbitrary PHP files and include CMS PHP files, leading to remote code execution. This affects all systems running vulnerable versions of XunRuiCMS with administrative access. Attackers can execute arbitrary PHP code on the server.

💻 Affected Systems

Products:
  • XunRuiCMS
Versions: 4.3.3 to 4.5.1
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Requires administrative access to exploit. All installations within the version range are vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server compromise allowing attackers to execute arbitrary commands, steal data, install malware, or pivot to other systems.

🟠

Likely Case

Website defacement, data theft, or installation of backdoors for persistent access.

🟢

If Mitigated

Limited impact if proper access controls and file permissions prevent exploitation.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires authenticated administrative access. Public proof-of-concept demonstrates file write and inclusion.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.5.2 or later

Vendor Advisory: https://github.com/xunruicms/xunruicms/releases

Restart Required: No

Instructions:

1. Backup your current installation. 2. Download XunRuiCMS version 4.5.2 or later from the official repository. 3. Replace vulnerable files with patched versions. 4. Verify the update was successful.

🔧 Temporary Workarounds

Restrict Administrative Access

all

Limit administrative access to trusted IP addresses only.

# Configure web server to restrict access to admin panel by IP
# Example for Apache: Require ip 192.168.1.0/24
# Example for Nginx: allow 192.168.1.0/24; deny all;

Disable cron.php if Unused

linux

Remove or disable cron.php file if cron functionality is not required.

mv /path/to/cron.php /path/to/cron.php.disabled
# Or set proper permissions: chmod 000 /path/to/cron.php

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate the vulnerable system.
  • Deploy a web application firewall (WAF) with rules to block exploitation attempts.

🔍 How to Verify

Check if Vulnerable:

Check the XunRuiCMS version in the admin panel or by examining the system files. Versions between 4.3.3 and 4.5.1 inclusive are vulnerable.

Check Version:

Check the version.php file or admin dashboard for version information.

Verify Fix Applied:

Verify the installed version is 4.5.2 or later. Test administrative functions to ensure they work without errors.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file write operations in cron.php logs
  • Suspicious PHP file creation in web directories
  • Multiple failed login attempts followed by successful admin login

Network Indicators:

  • HTTP POST requests to cron.php with file write parameters
  • Unexpected outbound connections from the web server

SIEM Query:

source="web_server" AND (uri="/cron.php" AND method="POST" AND (param="add" OR param="file"))

🔗 References

📤 Share & Export