CVE-2025-0298

6.3 MEDIUM

📋 TL;DR

CVE-2025-0298 is a critical SQL injection vulnerability in code-projects Online Book Shop 1.0 that allows remote attackers to execute arbitrary SQL commands via the 'usernm' parameter in /process_login.php. This affects all deployments of Online Book Shop 1.0, potentially compromising the entire database. Attackers can steal sensitive data, modify database contents, or gain unauthorized access to the application.

💻 Affected Systems

Products:
  • code-projects Online Book Shop
Versions: 1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of version 1.0 are vulnerable. The vulnerability exists in the default code without requiring special configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data manipulation, authentication bypass, and potential server takeover via SQL injection to RCE chaining.

🟠

Likely Case

Unauthorized access to sensitive user data (credentials, personal information), database manipulation, and potential privilege escalation within the application.

🟢

If Mitigated

Limited impact with proper input validation and parameterized queries preventing SQL injection, though other vulnerabilities might still exist.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit details are publicly available in the GitHub gist reference. SQL injection via login page requires no authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://code-projects.org/

Restart Required: No

Instructions:

No official patch available. Consider migrating to a secure alternative or implementing custom fixes with parameterized queries and input validation.

🔧 Temporary Workarounds

Web Application Firewall (WAF)

all

Deploy a WAF with SQL injection protection rules to block malicious requests targeting /process_login.php.

Input Validation Filter

all

Add server-side input validation to reject suspicious characters in the usernm parameter before processing.

🧯 If You Can't Patch

  • Isolate the vulnerable system behind a firewall with strict access controls.
  • Implement network segmentation to limit database access from the application server.

🔍 How to Verify

Check if Vulnerable:

Test /process_login.php with SQL injection payloads in the usernm parameter (e.g., ' OR '1'='1). Monitor for unexpected database responses or errors.

Check Version:

Check application files or documentation for version information; typically found in README files or configuration files.

Verify Fix Applied:

Verify that SQL injection payloads no longer execute and that parameterized queries or proper input validation are implemented in /process_login.php.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in application logs
  • Multiple failed login attempts with SQL-like patterns in usernm parameter
  • Unexpected database query patterns

Network Indicators:

  • HTTP POST requests to /process_login.php containing SQL keywords (UNION, SELECT, etc.) in parameters
  • Abnormal traffic patterns to the login endpoint

SIEM Query:

source="web_logs" AND uri="/process_login.php" AND (user_agent="sqlmap" OR params CONTAINS "UNION" OR params CONTAINS "SELECT" OR params CONTAINS "' OR '")

🔗 References

📤 Share & Export