CVE-2025-0172

6.3 MEDIUM

📋 TL;DR

CVE-2025-0172 is a critical SQL injection vulnerability in code-projects Chat System 1.0 that allows remote attackers to execute arbitrary SQL commands via the 'id' parameter in the /admin/deleteroom.php file. This affects all installations of Chat System 1.0 with the vulnerable file accessible, potentially leading to database compromise, data theft, or system takeover.

💻 Affected Systems

Products:
  • code-projects Chat System
Versions: 1.0
Operating Systems: All platforms running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all installations where /admin/deleteroom.php is accessible. The vulnerability exists in the default installation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data exfiltration, privilege escalation to administrative access, and potential remote code execution on the underlying server.

🟠

Likely Case

Unauthorized access to chat system data, manipulation of user accounts and chat rooms, and potential extraction of sensitive information from the database.

🟢

If Mitigated

Limited impact if proper input validation and parameterized queries are implemented, with database permissions restricted to prevent data manipulation.

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable and affects internet-facing chat systems, making them prime targets for automated attacks.
🏢 Internal Only: MEDIUM - Internal systems are still vulnerable but have reduced attack surface compared to internet-facing deployments.

🎯 Exploit Status

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

Exploit details are publicly available on GitHub, making this easily exploitable by attackers with basic SQL injection knowledge.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not available

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

Restart Required: No

Instructions:

No official patch available. Implement input validation and parameterized queries in /admin/deleteroom.php. Replace raw SQL queries with prepared statements using PDO or mysqli.

🔧 Temporary Workarounds

Input Validation Workaround

all

Add input validation to ensure 'id' parameter contains only numeric values

Edit /admin/deleteroom.php and add: if(!is_numeric($_GET['id'])) { die('Invalid input'); }

WAF Rule Implementation

linux

Implement web application firewall rules to block SQL injection patterns

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

🧯 If You Can't Patch

  • Block access to /admin/deleteroom.php at the web server level using .htaccess or nginx configuration
  • Implement network segmentation to isolate the chat system from sensitive databases and systems

🔍 How to Verify

Check if Vulnerable:

Test the /admin/deleteroom.php endpoint with SQL injection payloads like: /admin/deleteroom.php?id=1' OR '1'='1

Check Version:

Check the software version in the application interface or configuration files

Verify Fix Applied:

Test with the same payloads and verify they are rejected or properly sanitized without executing SQL commands

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in web server logs
  • Multiple requests to /admin/deleteroom.php with SQL-like patterns in parameters
  • Database connection errors or unusual query patterns

Network Indicators:

  • HTTP requests containing SQL keywords (SELECT, UNION, etc.) in URL parameters
  • Unusual traffic patterns to the /admin/ directory

SIEM Query:

source="web_server.logs" AND (url="/admin/deleteroom.php" AND (param="id" AND value MATCHES "[';]|OR|UNION|SELECT"))

🔗 References

📤 Share & Export