CVE-2024-3359

7.3 HIGH

📋 TL;DR

This critical SQL injection vulnerability in SourceCodester Online Library System 1.0 allows attackers to execute arbitrary SQL commands via the user_email parameter in admin/login.php. Attackers can potentially access, modify, or delete database content, including sensitive user information. Any organization using this specific software version is affected.

💻 Affected Systems

Products:
  • SourceCodester Online Library System
Versions: 1.0
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the admin/login.php file specifically. Requires PHP environment with database connectivity.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, authentication bypass, privilege escalation, and potential remote code execution on the underlying server.

🟠

Likely Case

Unauthorized access to sensitive library user data, administrative credentials theft, and potential system takeover.

🟢

If Mitigated

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

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit code is publicly available on GitHub. Attack can be performed remotely without authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: No

Instructions:

1. Check vendor website for updates. 2. If no patch available, implement workarounds. 3. Consider replacing with alternative software.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add server-side validation to sanitize user_email parameter before processing

Modify admin/login.php to use prepared statements with parameterized queries

Web Application Firewall Rules

all

Block SQL injection patterns targeting the user_email parameter

Add WAF rule: deny requests containing SQL keywords in user_email parameter

🧯 If You Can't Patch

  • Isolate the system 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 admin/login.php endpoint with SQL injection payloads in the user_email parameter

Check Version:

Check software version in admin panel or configuration files

Verify Fix Applied:

Attempt SQL injection after implementing fixes and verify no database errors or unexpected behavior occurs

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple failed login attempts with SQL patterns in parameters
  • Unexpected database queries from admin/login.php

Network Indicators:

  • HTTP POST requests to admin/login.php containing SQL keywords like UNION, SELECT, OR 1=1

SIEM Query:

source="web_logs" AND uri="/admin/login.php" AND (user_email CONTAINS "UNION" OR user_email CONTAINS "SELECT" OR user_email CONTAINS "OR 1=1")

🔗 References

📤 Share & Export