CVE-2025-14589

6.3 MEDIUM

📋 TL;DR

This CVE describes a SQL injection vulnerability in code-projects Prison Management System 2.0 affecting the /admin/search.php file. Attackers can manipulate the 'keyname' parameter to execute arbitrary SQL commands, potentially compromising the database. Organizations using this specific software version are affected.

💻 Affected Systems

Products:
  • code-projects Prison Management System
Versions: 2.0
Operating Systems: Any OS running PHP with database backend
Default Config Vulnerable: ⚠️ Yes
Notes: Requires the /admin/search.php endpoint to be accessible. The vulnerability is in the application code itself, not dependent on specific OS or database.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data manipulation, privilege escalation, and potential system takeover via SQL injection leading to remote code execution.

🟠

Likely Case

Unauthorized data access, extraction of sensitive prisoner/staff information, and potential authentication bypass to gain administrative privileges.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and network segmentation preventing database access.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit details are publicly available on GitHub. The vulnerability requires no authentication and has simple exploitation vectors.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

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

Restart Required: No

Instructions:

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

🔧 Temporary Workarounds

Input Validation Filter

all

Add input validation to sanitize the 'keyname' parameter before processing

Edit /admin/search.php to add: $keyname = mysqli_real_escape_string($connection, $_GET['keyname']);

Web Application Firewall Rule

all

Block SQL injection patterns targeting the search endpoint

WAF rule: Block requests to /admin/search.php containing SQL keywords in parameters

🧯 If You Can't Patch

  • Implement network segmentation to isolate the Prison Management System from other critical systems
  • Deploy a web application firewall (WAF) with SQL injection protection rules

🔍 How to Verify

Check if Vulnerable:

Test the /admin/search.php endpoint with SQL injection payloads in the 'keyname' parameter (e.g., keyname=' OR '1'='1)

Check Version:

Check application version in admin panel or configuration files

Verify Fix Applied:

Test with the same SQL injection payloads and verify they are properly sanitized or rejected

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts after search requests
  • Requests to /admin/search.php with SQL keywords in parameters

Network Indicators:

  • Unusual outbound database connections from web server
  • Large data transfers from database following search requests

SIEM Query:

source="web_logs" AND uri="/admin/search.php" AND (param="keyname" AND value CONTAINS "UNION" OR value CONTAINS "SELECT" OR value CONTAINS "OR '1'='1")

🔗 References

📤 Share & Export