CVE-2022-30395

9.8 CRITICAL

📋 TL;DR

Merchandise Online Store v1.0 contains a SQL injection vulnerability in the delete_cart function that allows attackers to execute arbitrary SQL commands. This affects all users running the vulnerable version of this e-commerce software. Attackers can potentially access, modify, or delete database contents.

💻 Affected Systems

Products:
  • Merchandise Online Store
Versions: v1.0
Operating Systems: Any OS running PHP web server
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all installations of v1.0. The vulnerability is in the core code and not configuration-dependent.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data destruction, authentication bypass, and potential remote code execution if database functions allow it.

🟠

Likely Case

Unauthorized access to customer data, order information, and administrative credentials stored in the database.

🟢

If Mitigated

Limited impact with proper input validation and database permissions, potentially only affecting non-sensitive data.

🌐 Internet-Facing: HIGH - The vulnerable endpoint is accessible via web interface and requires no authentication.
🏢 Internal Only: MEDIUM - Internal attackers could exploit this if they have network access to the application.

🎯 Exploit Status

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

Public proof-of-concept exists on GitHub. SQL injection is a well-understood attack vector with many automated tools available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: No official vendor advisory found

Restart Required: No

Instructions:

No official patch available. Consider upgrading to a newer version if available, or implement the workarounds below.

🔧 Temporary Workarounds

Input Validation and Parameterized Queries

all

Modify Master.php to implement proper input validation and use prepared statements for SQL queries

Edit /vloggers_merch/classes/Master.php to replace raw SQL with parameterized queries using PDO or mysqli prepared statements

WAF Rule Implementation

all

Deploy web application firewall rules to block SQL injection patterns

Add WAF rules to detect and block SQL injection attempts in query parameters

🧯 If You Can't Patch

  • Isolate the application behind a reverse proxy with strict input filtering
  • Implement network segmentation to limit database access from the application server

🔍 How to Verify

Check if Vulnerable:

Test the /vloggers_merch/classes/Master.php?f=delete_cart endpoint with SQL injection payloads like ' OR '1'='1

Check Version:

Check the application version in the source code or configuration files

Verify Fix Applied:

Test the same endpoint with SQL injection payloads and verify they are rejected or properly handled

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in application logs
  • Multiple failed delete_cart requests with suspicious parameters
  • Database queries with unexpected UNION or SELECT statements

Network Indicators:

  • HTTP requests to Master.php with SQL keywords in parameters
  • Unusual database connection patterns from the application server

SIEM Query:

source="web_logs" AND uri="/vloggers_merch/classes/Master.php" AND (param="f" AND value="delete_cart") AND (param CONTAINS "UNION" OR param CONTAINS "SELECT" OR param CONTAINS "OR")

🔗 References

📤 Share & Export