CVE-2025-4504

7.3 HIGH

📋 TL;DR

This critical SQL injection vulnerability in SourceCodester Online College Library System 1.0 allows attackers to manipulate database queries through the Category parameter in /index.php. Remote attackers can potentially access, modify, or delete database contents. All deployments of version 1.0 are affected.

💻 Affected Systems

Products:
  • SourceCodester Online College Library System
Versions: 1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of version 1.0 are vulnerable by default. No special configuration required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data manipulation, authentication bypass, and potential remote code execution via database functions.

🟠

Likely Case

Unauthorized data access and extraction of sensitive information like user credentials, personal data, and library records.

🟢

If Mitigated

Limited impact if proper input validation and WAF rules block malicious SQL payloads.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public exploit available on GitHub. SQL injection via Category parameter requires minimal technical skill.

🛠️ 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 implement workarounds.

🔧 Temporary Workarounds

Input Validation Filter

all

Add parameter validation to sanitize Category input before processing

Modify /index.php to validate Category parameter using prepared statements or whitelist validation

WAF Rule Implementation

all

Deploy web application firewall rules to block SQL injection patterns

Add WAF rule: Detect and block SQL keywords in Category parameter

🧯 If You Can't Patch

  • Isolate the system behind a reverse proxy with strict input validation
  • Implement network segmentation to limit database access from web server

🔍 How to Verify

Check if Vulnerable:

Test /index.php with Category parameter containing SQL injection payload like ' OR '1'='1

Check Version:

Check system version in admin panel or readme files

Verify Fix Applied:

Verify that SQL injection payloads no longer execute and return error pages

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in web server logs
  • Multiple requests with SQL keywords in Category parameter

Network Indicators:

  • HTTP requests containing SQL injection patterns in Category parameter

SIEM Query:

source="web_logs" AND (uri_path="/index.php" AND query_string="*Category=*SQL*" OR query_string="*Category=*' OR *")

🔗 References

📤 Share & Export