CVE-2025-13240

7.3 HIGH

📋 TL;DR

CVE-2025-13240 is an SQL injection vulnerability in code-projects Student Information System 2.0 that allows attackers to manipulate database queries through the 's' parameter in /searchquery.php. This enables unauthorized data access, modification, or deletion. Organizations using this software version are affected.

💻 Affected Systems

Products:
  • code-projects Student Information System
Versions: 2.0
Operating Systems: All platforms running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Any installation with /searchquery.php accessible is vulnerable. The vulnerability affects the core search functionality.

📦 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 escalation techniques.

🟠

Likely Case

Unauthorized access to sensitive student information (grades, personal data) and potential data manipulation.

🟢

If Mitigated

Limited impact with proper input validation, WAF rules, and database permissions restricting damage scope.

🌐 Internet-Facing: HIGH - Remote exploitation is possible and public exploit exists, making internet-facing instances immediate targets.
🏢 Internal Only: MEDIUM - Internal attackers or compromised internal systems could exploit this, but requires network access.

🎯 Exploit Status

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

Public exploit available on GitHub. SQL injection via parameter manipulation is straightforward for attackers with basic skills.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

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

Restart Required: No

Instructions:

1. Check vendor website for updates. 2. If no patch available, implement workarounds immediately. 3. Consider migrating to alternative software if vendor is unresponsive.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add parameter validation to /searchquery.php to sanitize 's' parameter input

Edit /searchquery.php and add: $search_term = mysqli_real_escape_string($connection, $_GET['s']);

Web Application Firewall Rules

all

Implement WAF rules to block SQL injection patterns targeting /searchquery.php

ModSecurity rule: SecRule ARGS:s "@detectSQLi" "id:1001,phase:2,deny,status:403"

🧯 If You Can't Patch

  • Block external access to /searchquery.php using network ACLs or firewall rules
  • Implement database user with minimal permissions (read-only if possible) for the application

🔍 How to Verify

Check if Vulnerable:

Test /searchquery.php with SQL injection payload: /searchquery.php?s=test' OR '1'='1

Check Version:

Check software documentation or admin panel for version information

Verify Fix Applied:

Retest with same payload after fixes; should return error or no data instead of executing query

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple rapid requests to /searchquery.php with special characters
  • Database query patterns with UNION, SELECT, or other SQL keywords from web logs

Network Indicators:

  • HTTP requests to /searchquery.php containing SQL metacharacters like quotes, semicolons, or comments

SIEM Query:

source="web_logs" AND uri_path="/searchquery.php" AND (query_string="*'*" OR query_string="*;*" OR query_string="*--*" OR query_string="*UNION*" OR query_string="*SELECT*" OR query_string="*OR*1*" OR query_string="*%27*" OR query_string="*%3B*")

🔗 References

📤 Share & Export