CVE-2024-9808

6.3 MEDIUM

📋 TL;DR

This is a critical SQL injection vulnerability in SourceCodester Online Eyewear Shop 1.0 that allows remote attackers to execute arbitrary SQL commands via the 'id' parameter in the /admin/?page=products/view_product endpoint. Attackers can potentially read, modify, or delete database contents. All users running the vulnerable version are affected.

💻 Affected Systems

Products:
  • SourceCodester Online Eyewear Shop
Versions: 1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation and requires no special configuration

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data destruction, or full system takeover via SQL injection to RCE chaining

🟠

Likely Case

Unauthorized data access, privilege escalation, or data manipulation in the eyewear shop database

🟢

If Mitigated

Limited impact if proper input validation and WAF rules are in place

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit details are publicly available on GitHub, making this easily exploitable

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://www.sourcecodester.com/

Restart Required: No

Instructions:

No official patch available. Consider upgrading to a newer version if available or implementing workarounds.

🔧 Temporary Workarounds

Input Validation and Parameterized Queries

all

Implement proper input validation and use parameterized queries/prepared statements for all database operations

WAF Rule Implementation

all

Deploy web application firewall rules to block SQL injection patterns targeting the vulnerable endpoint

🧯 If You Can't Patch

  • Restrict access to the /admin/ endpoint to trusted IP addresses only
  • Implement rate limiting and monitoring on the vulnerable endpoint

🔍 How to Verify

Check if Vulnerable:

Test the /admin/?page=products/view_product endpoint with SQL injection payloads in the 'id' parameter

Check Version:

Check the application version in the admin panel or configuration files

Verify Fix Applied:

Verify that SQL injection attempts no longer succeed and that parameterized queries are implemented

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in application logs
  • Multiple failed login attempts or unusual admin panel access patterns

Network Indicators:

  • HTTP requests to /admin/?page=products/view_product with SQL injection patterns in parameters

SIEM Query:

source="web_logs" AND uri="/admin/" AND (query="*SELECT*" OR query="*UNION*" OR query="*OR 1=1*")

🔗 References

📤 Share & Export