CVE-2022-26265

9.8 CRITICAL

📋 TL;DR

CVE-2022-26265 is a critical remote command execution vulnerability in Contao Managed Edition v1.5.0 that allows attackers to execute arbitrary commands on the server via the php_cli parameter. This affects all organizations running the vulnerable version of Contao Managed Edition. Successful exploitation gives attackers complete control over the affected system.

💻 Affected Systems

Products:
  • Contao Managed Edition
Versions: Version 1.5.0
Operating Systems: All operating systems running Contao Managed Edition
Default Config Vulnerable: ⚠️ Yes
Notes: Only version 1.5.0 is confirmed vulnerable. Other versions may be affected but not confirmed.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise allowing attackers to execute arbitrary commands, install malware, exfiltrate data, pivot to other systems, and establish persistent access.

🟠

Likely Case

Attackers gain shell access to the web server, allowing them to read sensitive files, modify website content, and potentially access backend databases.

🟢

If Mitigated

With proper network segmentation and least privilege, impact could be limited to the web application server only.

🌐 Internet-Facing: HIGH - This is a web application vulnerability that can be exploited remotely without authentication.
🏢 Internal Only: MEDIUM - While still vulnerable, internal systems have additional network protections but remain at risk from insider threats or compromised internal systems.

🎯 Exploit Status

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

Public proof-of-concept code exists and demonstrates trivial exploitation. No authentication required.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version 1.5.1 or later

Vendor Advisory: https://contao.org/en/security-advisories/

Restart Required: No

Instructions:

1. Backup your Contao installation and database. 2. Update Contao Managed Edition to version 1.5.1 or later. 3. Verify the update completed successfully. 4. Test application functionality.

🔧 Temporary Workarounds

Input Validation Filter

all

Add input validation to filter or block php_cli parameter containing command injection patterns

# Add to application code to sanitize php_cli parameter
# Example: filter_var($php_cli, FILTER_SANITIZE_STRING)

Web Application Firewall Rule

all

Block requests containing suspicious php_cli parameter values

# WAF rule to block php_cli parameter with command injection patterns
# Example ModSecurity rule: SecRule ARGS:php_cli "[;|&`$()]" "deny,status:403"

🧯 If You Can't Patch

  • Immediately isolate the affected system from the internet and restrict network access
  • Implement strict input validation for all user-controlled parameters, especially php_cli

🔍 How to Verify

Check if Vulnerable:

Check Contao version in admin panel or via composer show contao/managed-edition. If version is exactly 1.5.0, system is vulnerable.

Check Version:

composer show contao/managed-edition | grep versions

Verify Fix Applied:

Verify version is 1.5.1 or later using composer show contao/managed-edition or check admin panel version.

📡 Detection & Monitoring

Log Indicators:

  • Unusual php_cli parameter values in web logs
  • Commands like whoami, id, ls, cat in URL parameters
  • Multiple failed exploitation attempts

Network Indicators:

  • HTTP requests with php_cli parameter containing shell metacharacters
  • Outbound connections from web server to unexpected destinations

SIEM Query:

source="web_logs" AND (php_cli="*;*" OR php_cli="*|*" OR php_cli="*`*" OR php_cli="*$(*)")

🔗 References

📤 Share & Export