CVE-2025-13580

6.3 MEDIUM

📋 TL;DR

CVE-2025-13580 is a SQL injection vulnerability in code-projects Library System 1.0 affecting the /mail.php file. Attackers can remotely exploit this to execute arbitrary SQL commands on the database. All deployments of Library System 1.0 with the vulnerable /mail.php file are affected.

💻 Affected Systems

Products:
  • code-projects Library System
Versions: 1.0
Operating Systems: All platforms running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Any installation with /mail.php accessible is vulnerable. No special configuration required.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

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

🟠

Likely Case

Unauthorized data access, extraction of sensitive information, and potential privilege escalation.

🟢

If Mitigated

Limited impact with proper input validation and database permissions restricting damage to non-critical data.

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable and the exploit is publicly disclosed.
🏢 Internal Only: MEDIUM - Internal attackers could exploit this, but external threat is higher due to public disclosure.

🎯 Exploit Status

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

Exploit details are publicly disclosed on GitHub and vuldb.com, making exploitation straightforward.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

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

Restart Required: No

Instructions:

No official patch available. Consider workarounds or migrating to alternative software.

🔧 Temporary Workarounds

Input Validation Filter

all

Add input validation to sanitize the ID parameter in /mail.php

Edit /mail.php and add: $id = intval($_GET['ID']); before any SQL queries

WAF Rule

all

Implement web application firewall rules to block SQL injection patterns

Add WAF rule: Detect and block SQL injection patterns in URL parameters

🧯 If You Can't Patch

  • Disable or remove /mail.php file if not required
  • Implement network segmentation to restrict access to vulnerable system

🔍 How to Verify

Check if Vulnerable:

Check if /mail.php exists and accepts ID parameter without proper sanitization. Test with SQL injection payloads like: /mail.php?ID=1' OR '1'='1

Check Version:

Check software version in admin panel or configuration files. Default is 1.0.

Verify Fix Applied:

Test with SQL injection payloads after applying workarounds to confirm they are blocked.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple requests to /mail.php with suspicious parameters
  • Database query patterns with concatenated strings

Network Indicators:

  • HTTP requests to /mail.php containing SQL keywords (UNION, SELECT, etc.)
  • Unusual database connection patterns from web server

SIEM Query:

source="web_logs" AND uri="/mail.php" AND (param="ID" AND value MATCHES "[';]|UNION|SELECT")

🔗 References

📤 Share & Export