CVE-2022-30391

9.8 CRITICAL

📋 TL;DR

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

💻 Affected Systems

Products:
  • Merchandise Online Store
Versions: v1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the specific PHP file path /vloggers_merch/classes/Master.php with f=delete_category parameter

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data destruction, and potential remote code execution via database functions.

🟠

Likely Case

Unauthorized data access, data manipulation, and potential privilege escalation within the application.

🟢

If Mitigated

Limited impact with proper input validation and parameterized queries in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public proof-of-concept available on GitHub, SQL injection via URL parameter

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None known

Restart Required: No

Instructions:

1. Replace vulnerable code with parameterized queries
2. Implement proper input validation
3. Sanitize all user inputs before database operations

🔧 Temporary Workarounds

Web Application Firewall (WAF)

all

Deploy WAF rules to block SQL injection patterns targeting the vulnerable endpoint

Access Restriction

linux

Restrict access to /vloggers_merch/classes/Master.php via web server configuration

# Apache: 
<Location "/vloggers_merch/classes/Master.php">
    Order deny,allow
    Deny from all
</Location>
# Nginx: 
location /vloggers_merch/classes/Master.php {
    deny all;
}

🧯 If You Can't Patch

  • Implement network segmentation to isolate the vulnerable system
  • Enable detailed logging and monitoring for suspicious database queries

🔍 How to Verify

Check if Vulnerable:

Test the endpoint with SQL injection payloads: /vloggers_merch/classes/Master.php?f=delete_category&id=1' OR '1'='1

Check Version:

Check application version in configuration files or admin panel

Verify Fix Applied:

Verify parameterized queries are implemented and test with SQL injection payloads that should be rejected

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in application logs
  • Multiple failed delete_category requests with SQL syntax

Network Indicators:

  • HTTP requests to Master.php with SQL keywords in parameters
  • Unusual database query patterns from web server

SIEM Query:

source="web_logs" AND uri="/vloggers_merch/classes/Master.php" AND (query_string="*delete_category*" AND (query_string="*' OR*" OR query_string="*UNION*" OR query_string="*SELECT*"))

🔗 References

📤 Share & Export