CVE-2023-41892

10.0 CRITICAL

📋 TL;DR

CVE-2023-41892 is a critical remote code execution vulnerability in Craft CMS that allows attackers to execute arbitrary code on affected systems. This affects all Craft CMS installations before version 4.4.15. The vulnerability stems from improper input validation that enables code injection attacks.

💻 Affected Systems

Products:
  • Craft CMS
Versions: All versions before 4.4.15
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All Craft CMS installations with default configurations are vulnerable. No special configuration required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise with attacker gaining full control over the web server, allowing data theft, malware deployment, and lateral movement within the network.

🟠

Likely Case

Attackers deploy web shells, steal sensitive data, deface websites, or use the compromised server for cryptocurrency mining or botnet activities.

🟢

If Mitigated

With proper network segmentation and least privilege principles, impact could be limited to the web application layer, preventing lateral movement to other systems.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public exploit code is available on Packet Storm Security. The vulnerability requires no authentication and has low attack complexity.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.4.15

Vendor Advisory: https://github.com/craftcms/cms/blob/develop/CHANGELOG.md#4415---2023-07-03-critical

Restart Required: No

Instructions:

1. Backup your Craft CMS installation and database. 2. Update Craft CMS to version 4.4.15 or later via Composer: 'composer require craftcms/cms:^4.4.15'. 3. Run any required database migrations. 4. Clear caches and verify the update.

🔧 Temporary Workarounds

Web Application Firewall (WAF)

all

Deploy a WAF with rules to block code injection patterns and suspicious PHP function calls.

Disable PHP Execution in Upload Directories

linux

Configure web server to prevent PHP execution in upload and temporary directories.

For Apache: Add 'php_flag engine off' to .htaccess in vulnerable directories
For Nginx: Add 'location ~ \.php$ { deny all; }' to vulnerable directory config

🧯 If You Can't Patch

  • Isolate the vulnerable system in a separate network segment with strict firewall rules limiting inbound and outbound connections.
  • Implement strict file integrity monitoring and real-time alerting for any file modifications in the web directory.

🔍 How to Verify

Check if Vulnerable:

Check Craft CMS version in admin panel or via 'composer show craftcms/cms' command. If version is below 4.4.15, system is vulnerable.

Check Version:

composer show craftcms/cms | grep versions

Verify Fix Applied:

Confirm version is 4.4.15 or higher via admin panel or 'composer show craftcms/cms'. Test that previously vulnerable endpoints no longer accept malicious payloads.

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests with PHP code patterns
  • Unexpected file creation in web directories
  • Suspicious process execution from web user context
  • Multiple failed exploitation attempts

Network Indicators:

  • Outbound connections to suspicious IPs from web server
  • Unusual traffic patterns to/from web server
  • Command and control beaconing behavior

SIEM Query:

source="web_server_logs" AND ("php://" OR "system(" OR "exec(" OR "shell_exec(" OR suspicious_file_upload_patterns)

🔗 References

📤 Share & Export