CVE-2024-36694

7.2 HIGH

📋 TL;DR

OpenCart 4.0.2.3 contains a Server-Side Template Injection vulnerability in the Theme Editor function that allows authenticated attackers to execute arbitrary code on the server. This affects OpenCart administrators with theme editing permissions. Successful exploitation could lead to complete system compromise.

💻 Affected Systems

Products:
  • OpenCart
Versions: 4.0.2.3 specifically
Operating Systems: All platforms running OpenCart
Default Config Vulnerable: ⚠️ Yes
Notes: Requires admin access to the theme editor functionality

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to full server takeover, data theft, and lateral movement within the network

🟠

Likely Case

Unauthorized file system access, data exfiltration, and backdoor installation

🟢

If Mitigated

Limited impact if proper access controls and input validation are implemented

🌐 Internet-Facing: HIGH - Web applications are directly accessible and the vulnerability requires only authenticated admin access
🏢 Internal Only: MEDIUM - Requires authenticated admin access which may be more controlled internally

🎯 Exploit Status

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

Exploit requires authenticated admin access but is straightforward to execute

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Update to version 4.0.2.4 or later

Vendor Advisory: https://github.com/opencart/opencart/releases/tag/4.0.2.3

Restart Required: No

Instructions:

1. Backup your OpenCart installation and database. 2. Download the latest OpenCart version. 3. Replace affected files with patched versions. 4. Clear cache and verify functionality.

🔧 Temporary Workarounds

Disable Theme Editor

all

Remove or restrict access to the theme editor functionality

# Remove or rename the theme editor files
# Example: mv admin/controller/design/theme.php admin/controller/design/theme.php.disabled

Restrict Admin Access

all

Implement strict access controls and multi-factor authentication for admin accounts

🧯 If You Can't Patch

  • Implement strict network segmentation and firewall rules to limit access to OpenCart admin interface
  • Deploy web application firewall (WAF) with SSTI detection rules and monitor for suspicious template injection attempts

🔍 How to Verify

Check if Vulnerable:

Check if running OpenCart version 4.0.2.3 and verify theme editor functionality is accessible

Check Version:

Check OpenCart version in admin dashboard or examine system/config.php file

Verify Fix Applied:

Confirm OpenCart version is 4.0.2.4 or later and test theme editor for SSTI payloads

📡 Detection & Monitoring

Log Indicators:

  • Unusual theme editor access patterns
  • Suspicious template syntax in POST requests
  • Unexpected file creation/modification

Network Indicators:

  • POST requests to theme editor endpoints containing template injection payloads

SIEM Query:

source="web_logs" AND (uri="/admin/index.php?route=design/theme" OR uri="/admin/controller/design/theme") AND (payload CONTAINS "{{" OR payload CONTAINS "{%" OR payload CONTAINS "{#")

🔗 References

📤 Share & Export