CVE-2023-2315

8.1 HIGH

📋 TL;DR

This path traversal vulnerability in OpenCart allows authenticated users with Log component modify privileges to delete arbitrary files on the server. It affects OpenCart installations from version 4.0.0.0 through 4.0.2.2. Attackers could potentially delete critical system files or application data.

💻 Affected Systems

Products:
  • OpenCart
Versions: 4.0.0.0 to 4.0.2.2
Operating Systems: All operating systems running OpenCart
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated user with access/modify privilege on Log component. Default admin users typically have this privilege.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise via deletion of critical system files, leading to service disruption, data loss, or privilege escalation.

🟠

Likely Case

Unauthorized deletion of application files, configuration files, or user data causing service disruption and data loss.

🟢

If Mitigated

Limited impact if proper access controls and file permissions are in place, restricting damage to non-critical files.

🌐 Internet-Facing: HIGH - Internet-facing OpenCart installations are directly accessible to attackers who can obtain authenticated access.
🏢 Internal Only: MEDIUM - Internal systems still vulnerable to insider threats or compromised accounts with appropriate privileges.

🎯 Exploit Status

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

Exploitation requires authenticated access but is straightforward once credentials are obtained. Public proof-of-concept available in advisory links.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.0.2.3 and later

Vendor Advisory: https://github.com/opencart/opencart/commit/0a8dd91e385f70e42795380009fd644224c1bc97

Restart Required: No

Instructions:

1. Backup your OpenCart installation and database. 2. Download OpenCart 4.0.2.3 or later from official sources. 3. Replace affected files with patched versions. 4. Clear OpenCart cache. 5. Verify functionality.

🔧 Temporary Workarounds

Restrict Log Component Access

all

Remove modify privileges from Log component for non-essential users

Navigate to System > Users > User Groups in OpenCart admin panel
Edit user groups to remove 'access/modify' permission for Log component

File Permission Hardening

linux

Set restrictive permissions on critical directories to prevent deletion

chmod 755 /path/to/opencart/
chmod 644 /path/to/opencart/system/storage/logs/*
chmod 755 /path/to/opencart/system/storage/logs/

🧯 If You Can't Patch

  • Implement strict access controls: Only grant Log component modify privileges to absolutely necessary administrative accounts.
  • Enable comprehensive logging and monitoring of file deletion activities, particularly in system directories.

🔍 How to Verify

Check if Vulnerable:

Check OpenCart version in admin panel Dashboard or examine /upload/version.php file for version string.

Check Version:

grep -r "define.*VERSION" /path/to/opencart/upload/version.php

Verify Fix Applied:

Verify version is 4.0.2.3 or later, and check that the patch commit 0a8dd91e385f70e42795380009fd644224c1bc97 is applied in the codebase.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file deletion events in system logs
  • Multiple failed authentication attempts followed by successful login and file operations
  • Admin panel access from unusual IP addresses

Network Indicators:

  • HTTP POST requests to admin log endpoints with suspicious file paths
  • Unusual outbound traffic patterns after file deletion

SIEM Query:

source="opencart_logs" AND (event="file_deletion" OR event="log_clear") AND file_path CONTAINS "../"

🔗 References

📤 Share & Export