CVE-2024-21514

7.4 HIGH

📋 TL;DR

An SQL injection vulnerability in the Divido payment extension for OpenCart allows unauthenticated attackers to execute arbitrary SQL queries. This affects OpenCart installations with the Divido module installed (even if disabled), potentially exposing the entire database including customer PII. All OpenCart versions up to 3.0.3.9 are vulnerable.

💻 Affected Systems

Products:
  • OpenCart
Versions: All versions up to and including 3.0.3.9
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerable if Divido payment module is installed (comes by default in 3.0.3.9). Module does not need to be enabled.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including customer PII, admin credentials, and financial data leading to data breach, account takeover, and potential regulatory penalties.

🟠

Likely Case

Unauthenticated attackers dump customer data, extract admin credentials, and potentially gain administrative access to the OpenCart backend.

🟢

If Mitigated

Limited impact with proper network segmentation, WAF rules blocking SQL injection patterns, and database access controls.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

SQL injection in catalog/model/extension/payment/divido.php at line 114. Public exploit code available in security advisories.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after commit 46bd5f5a8056ff9aad0aa7d71729c4cf593d67e2

Vendor Advisory: https://github.com/opencart/opencart/commit/46bd5f5a8056ff9aad0aa7d71729c4cf593d67e2

Restart Required: No

Instructions:

1. Update OpenCart to latest version. 2. Apply commit 46bd5f5a8056ff9aad0aa7d71729c4cf593d67e2. 3. Remove or disable Divido module if not needed.

🔧 Temporary Workarounds

Disable Divido Module

linux

Completely remove the Divido payment module files

rm -rf upload/catalog/model/extension/payment/divido.php
rm -rf upload/admin/model/extension/payment/divido.php

WAF Rule Implementation

all

Add SQL injection blocking rules targeting Divido endpoints

🧯 If You Can't Patch

  • Implement strict WAF rules blocking SQL injection patterns to /catalog/model/extension/payment/divido.php endpoints
  • Network segment OpenCart instance and restrict database access to only necessary IPs

🔍 How to Verify

Check if Vulnerable:

Check if file upload/catalog/model/extension/payment/divido.php exists and contains vulnerable code at line 114 without proper input sanitization

Check Version:

Check OpenCart version in admin panel or read VERSION.txt file

Verify Fix Applied:

Verify commit 46bd5f5a8056ff9aad0aa7d71729c4cf593d67e2 is applied and divido.php uses parameterized queries

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple requests to /catalog/model/extension/payment/divido.php with SQL patterns
  • Large data extraction patterns

Network Indicators:

  • POST requests to Divido endpoints containing SQL keywords (UNION, SELECT, INSERT)

SIEM Query:

source="web_logs" AND uri="/catalog/model/extension/payment/divido.php" AND (query CONTAINS "UNION" OR query CONTAINS "SELECT *" OR query CONTAINS "--")

🔗 References

📤 Share & Export