CVE-2024-3360

7.3 HIGH

📋 TL;DR

CVE-2024-3360 is a critical SQL injection vulnerability in SourceCodester Online Library System 1.0 that allows remote attackers to execute arbitrary SQL commands via the 'id' parameter in admin/books/index.php. This affects all deployments of this specific library management software version. Attackers can potentially read, modify, or delete database content without authentication.

💻 Affected Systems

Products:
  • SourceCodester Online Library System
Versions: 1.0
Operating Systems: All platforms running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the admin interface at admin/books/index.php specifically

📦 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 chain

🟠

Likely Case

Unauthorized data access, privilege escalation, and potential authentication bypass

🟢

If Mitigated

Limited impact with proper input validation and database permissions

🌐 Internet-Facing: HIGH - Remote exploitation possible without authentication
🏢 Internal Only: MEDIUM - Still exploitable but requires network access

🎯 Exploit Status

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

Public exploit code available on GitHub, simple parameter manipulation required

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: No

Instructions:

No official patch available. Consider replacing with alternative software or implementing custom fixes.

🔧 Temporary Workarounds

Input Validation Filter

all

Add parameter validation to sanitize 'id' parameter before SQL execution

Modify admin/books/index.php to validate/sanitize the id parameter using prepared statements or type casting

WAF Rule Implementation

all

Deploy web application firewall rules to block SQL injection patterns

Add WAF rule: Detect and block SQL injection patterns in id parameter

🧯 If You Can't Patch

  • Block external access to admin/books/index.php via firewall rules
  • Implement strict database user permissions with read-only access where possible

🔍 How to Verify

Check if Vulnerable:

Test admin/books/index.php?id=1' OR '1'='1 to see if SQL error occurs

Check Version:

Check software version in system configuration or about page

Verify Fix Applied:

Test same payload after fix - should return normal response without SQL errors

📡 Detection & Monitoring

Log Indicators:

  • SQL syntax errors in web server logs
  • Unusual database queries from web application
  • Multiple failed parameter validation attempts

Network Indicators:

  • HTTP requests to admin/books/index.php with SQL injection patterns in parameters

SIEM Query:

source="web_logs" AND (uri="*admin/books/index.php*" AND (param="*id=*'*" OR param="*id=*%27*"))

🔗 References

📤 Share & Export