CVE-2026-3754

6.3 MEDIUM

📋 TL;DR

This SQL injection vulnerability in SourceCodester Sales and Inventory System 1.0 allows attackers to manipulate database queries via the 'cost' parameter in /add_stock.php. Attackers can potentially read, modify, or delete database contents. Organizations using this specific software version are affected.

💻 Affected Systems

Products:
  • SourceCodester Sales and Inventory System
Versions: 1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the web application component; requires PHP and MySQL/MariaDB backend.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including theft of sensitive data, inventory manipulation, financial fraud, and potential system takeover.

🟠

Likely Case

Data exfiltration of sales records, customer information, and inventory data leading to business disruption and compliance violations.

🟢

If Mitigated

Limited impact with proper input validation and database permissions restricting unauthorized access.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public proof-of-concept available; remote exploitation with minimal technical skill required.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

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

Restart Required: No

Instructions:

1. Check vendor website for updates. 2. If patch available, download and apply. 3. Test functionality after patching.

🔧 Temporary Workarounds

Input Validation Filter

all

Add server-side validation to sanitize 'cost' parameter input

Modify /add_stock.php to validate numeric input: if(!is_numeric($_POST['cost'])) { die('Invalid input'); }

WAF Rule

all

Implement web application firewall rules to block SQL injection patterns

Add WAF rule: Detect and block requests containing SQL keywords in 'cost' parameter

🧯 If You Can't Patch

  • Isolate the system behind a firewall with strict access controls
  • Implement database-level permissions to limit damage from SQL injection

🔍 How to Verify

Check if Vulnerable:

Test /add_stock.php endpoint with SQL injection payloads in 'cost' parameter

Check Version:

Check application version in admin panel or configuration files

Verify Fix Applied:

Verify input validation rejects non-numeric values in 'cost' parameter

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts following SQL injection patterns

Network Indicators:

  • HTTP requests to /add_stock.php with SQL keywords in parameters

SIEM Query:

source="web_logs" AND uri="/add_stock.php" AND (param="cost" AND value MATCHES "(?i)(union|select|insert|delete|update|drop|--|#)")

🔗 References

📤 Share & Export